OpenSolaris

Printable Version Enter a New Search
Bug ID 6309381
Synopsis gcc and idn don't get along
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:idn
Keywords non-regression | oss-bite-size | other_escape | tonic-gcc | triaged
Sponsor
Submitter
Responsible Engineer Kelly Moyer
Reported Against
Duplicate Of
Introduced In
Commit to Fix snv_29
Fixed In snv_29
Release Fixed solaris_nevada(snv_29)
Related Bugs
Submit Date 11-August-2005
Last Update Date 3-December-2005
Description
The IDN kernel drivers have some code quality problems that trigger
warnings when built with gcc.  Some also indicate real bugs.  They
fall into these general categories:

1. Useless comparisons.  Comparing unsigned types >= 0 or any variable
<= its maximum possible value is useless and causes a warning.  In many
cases this is hard to see because the constants being compared are
not literals.  Note that DECSPACE is interesting; it's a macro that is
passed more than one type; the comparisons it does are meaningful for
some types and not for others.  The suggested fix creates a separate
DECSPACE16 for use with 16-bit variables, but there's probably a better
way.

2. Incorrect format strings in debug output.  Mainly these are missing or
extra 'l' qualifiers, confusion between %p and %x or %lx, or missing
or extra arguments.

3. Casts between pointers and integers of different sizes.  The standards
do not specify whether such casts cause sign extension; gcc sign-extends
and warns while Studio does neither.  The safe way to keep the current
behaviour is to cast to uintptr_t first.

See suggested fix for further details.

[oss-bite-size]
Work Around
N/A
Comments
N/A