public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26494]  New: -pedantic-errors can be overridden by -W*
@ 2006-02-28 11:35 fn_x at hotmail dot com
  2006-02-28 13:11 ` [Bug c/26494] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: fn_x at hotmail dot com @ 2006-02-28 11:35 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

This simple incorrect program:

int main() { puts("Hello"); }

when compiled with gcc -std=c99 -pedantic-errors is rejected with

test.c: In function ‘main’:
test.c:1: error: implicit declaration of function ‘puts’

However, add -Wall to the options, and it becomes:

test.c: In function ‘main’:
test.c:1: warning: implicit declaration of function ‘puts’

and the program compiles and runs without errors. I think gcc should not
compile it. Also, reordering the options doesn't change anything.

Given how old this is (I can see it with gcc 3.3.6, 3.4.5, 4.0.2 and
4.1(20060223)), I'm a bit surprised if it hasn't come up before, but I searched
bugzilla and didn't find anything. Sorry for anything I missed.


-- 
           Summary: -pedantic-errors can be overridden by -W*
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fn_x at hotmail dot com


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-02-15 22:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-28 11:35 [Bug c/26494] New: -pedantic-errors can be overridden by -W* fn_x at hotmail dot com
2006-02-28 13:11 ` [Bug c/26494] " pinskia at gcc dot gnu dot org
2007-01-22 23:48 ` manu at gcc dot gnu dot org
2007-01-23  0:05 ` truedfx at gentoo dot org
2007-01-23  0:08 ` truedfx at gentoo dot org
2007-01-23  0:10 ` manu at gcc dot gnu dot org
2007-01-23  0:23 ` truedfx at gentoo dot org
2007-01-24 19:10 ` patchapp at dberlin dot org
2007-01-25  9:55 ` patchapp at dberlin dot org
2007-02-15 22:31 ` manu at gcc dot gnu dot org
2007-02-15 22:34 ` manu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).