This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20905] New: confuses unrelated type name with instance name
- From: "boris at kolpackov dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Apr 2005 16:54:17 -0000
- Subject: [Bug c++/20905] New: confuses unrelated type name with instance name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ 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