public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28992] New: g++ lacks the "empty bodyin an if-statement" warning emitted by gcc
@ 2006-09-08 22:45 simon_baldwin at yahoo dot com
2006-09-08 23:29 ` [Bug c++/28992] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: simon_baldwin at yahoo dot com @ 2006-09-08 22:45 UTC (permalink / raw)
To: gcc-bugs
$ cat bad_if.cc
#include <stdio.h>
int main() {
if (0); { /* Semicolon accidentally added between condition and brace. */
printf("Not intended to be printed\n");
}
return 0;
}
$ .../i686-unknown-linux-gnu-g++ --version
i686-unknown-linux-gnu-g++ (GCC) 4.1.0
$ .../i686-unknown-linux-gnu-g++ -W -Werror -o bad_if bad_if.cc; echo $?
0
$ .../i686-unknown-linux-gnu-g++ -xc -W -Werror -o bad_if bad_if.cc; echo $?
cc1: warnings being treated as errors
bad_if.cc: In function 'main':
bad_if.cc:4: warning: empty body in an if-statement
1
--
Summary: g++ lacks the "empty bodyin an if-statement" warning
emitted by gcc
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: simon_baldwin at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28992
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/28992] g++ lacks the "empty bodyin an if-statement" warning emitted by gcc
2006-09-08 22:45 [Bug c++/28992] New: g++ lacks the "empty bodyin an if-statement" warning emitted by gcc simon_baldwin at yahoo dot com
@ 2006-09-08 23:29 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-08 23:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-08 23:28 -------
This is a dup of bug 5520 which was fixed in 4.2.0.
*** This bug has been marked as a duplicate of 5520 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28992
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-08 23:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-08 22:45 [Bug c++/28992] New: g++ lacks the "empty bodyin an if-statement" warning emitted by gcc simon_baldwin at yahoo dot com
2006-09-08 23:29 ` [Bug c++/28992] " pinskia 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).