[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libc6-dev and "-pedantic -O" warnings



Shawn Yarbrough <shawn@rivalsoftware.com> writes:

> I'm very glad to hear you say this.  What about something like socket.h,
> which is not as "standard" but which is commonly used for many
> applications?  Shouldn't such headers also compile cleanly in strict
> ANSI/ISO mode?

Well, they don't *have* to, technically -- it's a quality of
implementation issue.  But in general, gcc tries to make its
ISO-compatible mode as useful as possible (as contrasted with MS, who
seems to try to make it as *useless* as possible).

The problem with ctype.h complaining when the -pedantic flag is used
should probably be considered a bug.  OTOH, the -pedantic flag is
regarded by the FSF as almost useless -- it's there to check ISO
features that you *normally* wouldn't care about.  That's why it's
"pedantic".  In practice, if it compiles without warning with "-ansi
-O2 -Wall", it's probably compliant enough for every *existing*
compiler out there.

-- 
Chris Waters   xtifr@dsp.net | I have a truly elegant proof of the
      or    xtifr@debian.org | above, but it is too long to fit into
http://www.dsp.net/xtifr     | this .signature file.


Reply to: