$ cat >text.cxx struct name {}; int f ();
void g () { if (int name = f ()) { } } $ g++-3.4 -c text.cxx test.cxx: In function `void g()': test.cxx:9: error: expected primary-expression before "int" test.cxx:9: error: expected `)' before "int" -- Summary: confuses unrelated type name with instance name Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: boris at kolpackov dot net CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20905