This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/39012] GCC accepts badly formatted while statement
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2009 22:17:27 -0000
- Subject: [Bug c/39012] GCC accepts badly formatted while statement
- References: <bug-39012-8132@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-28 22:17 -------
>while ( !b );
Is vaild code but should be warned about.
In fact with 4.3 and above we do get a warning with -W -Wall:
t.cc: In function 'void g()':
t.cc:13: warning: suggest a space before ';' or explicit braces around empty
body in 'while' statement
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39012