This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/39012] GCC accepts badly formatted while statement



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]