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

2011-03-18 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48185 --- Comment #3 from Jonathan Wakely 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 } ) Se

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

2011-03-18 Thread lisp2d at lisp2d dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48185 --- Comment #2 from Lisp2D 2011-03-18 17:15:23 UTC --- Code { struct passwd*pwd(getpwuid(...)); if(pwd)return true;} is still compiled. Code if(struct passwd*pwd=getpwuid(...))return; compiled too. But if(struct passwd*pwd(getpwuid(...)

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

2011-03-18 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48185 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|