unwanted compiler warnings with -pedantic

Shayne Steele steele@cs.fsu.edu
Wed Oct 25 10:40:00 GMT 2000


        Thank you for your response.

        The problem is I WANT all those little annoying warnings for MY
code just not for the COMPILER'S code.  I have found that code that
produces no warnings when the '-Wall -pedantic' flags are used is VERY
portable between different compilers and between different machine
architectures.  
        A compiler that complains about its own code seems weird.  In
B20.1 this this problem did not occur, perhaps the compiler should be
re-looked at in the net release.
> > 
> > Well, the -pedantic switch turns on as many annoying warnings as
> > possible; the word "pedantic" means overly attentive to rules,
> > excessively "by the book."
> > 
> > That said, the info pages for gcc tell you how to turn off some
> > specific warnings. For instance -Wno-long-long turns off the long long
> > warning,
> > 
> > I think Shayne Steele wrote:
> > >Hello
> > >
> > >        I recently upgraded from B20.1 to the net release 1.1.x.
> > >My GCC compiler options include -Wall -pedantic.  My program use to
> > >compile with no errors or warnings, but after the upgrade (and modifying
> > >my makefile to point to the new locations of the libraries) I got a lot
> > >of 'extra' warnings, such as:
> > >
> > >c:/cygwin/usr/include/mingw32/stdlib.h:349: warning: ANSI C does not
> > >support `long long'
> > >/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../include/mmsystem.h:1195:
> > >warning: ANSI C doesn't support unnamed structs/unions
> > >usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../include/winbase.h:814:
> > >warning: ANSI C doesn't support unnamed structs/unions
> > >/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../include/winnt.h:2269:
> > >warning: ANSI C doesn't support unnamed structs/unions
> > >
> > >These warnings are annoying, how do I get rid of them?  I just want
> > >warnings on the code I wrote.  I want to keep using the net release and
> > >the -pedantic option (if at all possible).
> > ---------------------------------------------------------
> > Ernest Friedman-Hill  
-- 
Shayne Steele	    Graduate Student in Computer Science at FSU
steele@cs.fsu.edu   http://www.cs.fsu.edu/~steele/
With great abilities come great responsibilities. -- Stan Lee

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list