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
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(...)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48185
Richard Guenther changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|