This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC 3.0 Branch: Guidelines


Hi Neil,

The difficulty I see is in isolating warnings that relate to
standards compliance or use of gcc extensions.

For example, if I use gcc -w -ansi, I still see "general" warnings such
as passing an uncasted unsigned char buffer to fgets(). These
warnings are also translated to fatal errors if I additionally
use -pedantic-errors. A a user of gcc, it seems that classes of
warnings are not distinct from each other.

If I could 'grep' the true ansi/iso-related warnings with a search 
string (say "ANSI" or "ISO"), that would be a real big help with
maintaining portability in code I write.

Colm.

>To: Colm Smyth <Colm.Smyth@Sun.COM>
>Cc: gcc@gcc.gnu.org, mark@codesourcery.com
>Subject: Re: GCC 3.0 Branch: Guidelines
>Mime-Version: 1.0
>Content-Disposition: inline
>User-Agent: Mutt/1.3.15i
>From: Neil Booth <neil@daikokuya.demon.co.uk>
>
>Colm Smyth wrote:-
>
>> My second category of issues basically applies to all of the gcc extensions
>> that aren't in ISO C (and to a lesser extent, some features that have
>> come into ISO C, but perhaps not in the same way as they are implemented
>> in gcc). Using the -pedantic switch will turn on a lot of warnings (some
>> of which are actually fatal to compiles), but not all of these warnings
>> are specific to standards-compliance.
>
>Incidentally, if -pedantic fails to warn about a GCC extension, that is a
>bug.  I think I'm also correct in saying that it has no business making
>those warnings into errors (unless you used -pedantic-errors), so that
>would also be a bug.
>
>Examples would be of use in fixing them; we do try to get this stuff right.
>
>Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]