[Bug c++/48185] if(struct ...)

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 18 17:46:00 GMT 2011


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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-18 17:27:43 UTC ---
G++ is right

a declaration in a selection-statement (if or switch) must be of the form:
  if ( type-specifier id = initializer )
or in C++0x:
  if ( type-specifier id { init } )

See 6.4 in the C++ standard



More information about the Gcc-bugs mailing list