OpenSolaris

Printable Version Enter a New Search
Bug ID 6309788
Synopsis gcc and sunfire drivers don't get along
State 10-Fix Delivered (Fix available in build)
Category:Subcategory driver:other
Keywords tonic-gcc
Responsible Engineer Mike Sullivan
Reported Against
Duplicate Of
Introduced In solaris_2.5.1
Commit to Fix snv_30
Fixed In snv_30
Release Fixed solaris_nevada(snv_30)
Related Bugs
Submit Date 11-August-2005
Last Update Date 25-March-2006
Description
A few sunfire drivers trigger warnings when built with gcc.  These fall
into a few general categories:

1. Incorrect format strings, mainly using %p when %x is appropriate or
vice versa.

2. 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.

3. In sysctl_dr.c, a struct is declared extern, but no associated
variable is declared.  static and extern only apply to variables, and
gcc warns if they are used with type declarations.

See suggested fix for more detail.
Work Around
N/A
Comments
N/A