Difference between -pedantic, -pedantic-errors -Wall and -W

Jonathan D.Turkanis turkanis@kangaroologic.com
Fri Jun 10 22:10:00 GMT 2005


Hi,

I'm writing a book chapter on C++ build systems, and I want to make sure I 
understand the gcc options which relate to strict ISO conformance. I've read the 
docs, but still have some questions:

* Is -pedantic enabled by default? For what versions of gcc?
* The entry for -pedantic says "Issue all the warnings demanded by strict ISO C 
and ISO C++"; I'm not aware that ISO ever requires "warnings," i.e., that it 
ever requires diagnostics to be issued for conforming programs. So what exactly 
does this mean?
* The enty for -pedantic-errors says "Like -pedantic, except that errors are 
produced rather than warnings". Since -pedantic causes *some* errors to be 
reported for non-conforming code, e.g., code that uses "forbidden extensions," 
what additional errors are reported when -pedantic-errors is used?
* Does either of -pedantic and -Wall subsume the other?
* Is the option -W supported in 3.4 and later?

Any help would be greatly appreciated.

Best Regards,
Jonathan



More information about the Gcc-help mailing list