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++/48185] if(struct ...)


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


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