[Bug c/26494] -pedantic-errors can be overridden by -W*

truedfx at gentoo dot org gcc-bugzilla@gcc.gnu.org
Tue Jan 23 00:05:00 GMT 2007



------- Comment #3 from truedfx at gentoo dot org  2007-01-23 00:05 -------
-Wendif-labels and -Wimplicit-int don't turn errors into warnings, so probably,
yes. I did notice something else of interest while testing, though:

int main(char a) {}

gcc bug.c -ansi -pedantic
compiles this without any error or warning.

gcc bug.c -ansi -pedantic -Wmain
reports
bug.c:1: warning: first argument of ‘main’ should be
‘int’
bug.c:1: warning: ‘main’ takes only zero or two arguments
and compiles this.

gcc bug.c -ansi -pedantic-errors
compiles this without any error or warning.

gcc bug.c -ansi -pedantic-errors -Wmain
reports
bug.c:1: error: first argument of ‘main’ should be
‘int’
bug.c:1: error: ‘main’ takes only zero or two arguments
and does not compile this.

Is that close enough to be covered by this bug report, should I report that as
a new bug, or should I not report that at all?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26494



More information about the Gcc-bugs mailing list