This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30551] New: -pedantic does not include -Wmain, but -pedantic-errors does make -Wmain cause error messages
- From: "truedfx at gentoo dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2007 00:22:36 -0000
- Subject: [Bug c/30551] New: -pedantic does not include -Wmain, but -pedantic-errors does make -Wmain cause error messages
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Noticed while doing a test for bug #26494:
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.
gcc --version:
gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: -pedantic does not include -Wmain, but -pedantic-errors
does make -Wmain cause error messages
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: truedfx at gentoo dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30551