c++/9223: Parse error with gcc 3.2.1 for fully qualified name in namespace
lalle@sics.se
lalle@sics.se
Wed Jan 8 08:26:00 GMT 2003
>Number: 9223
>Category: c++
>Synopsis: Parse error with gcc 3.2.1 for fully qualified name in namespace
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Jan 08 00:26:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Lars Albertsson
>Release: 3.2.1
>Organization:
>Environment:
i686-pc-linux-gnu, Redhat Linux 8.0, thread mode posix.
>Description:
namespace ns
{
const int ci = 0;
struct C
{
C(int i);
};
void operator<<(C c, int);
void
test()
{
C( ::ns::ci) << 1;
}
}
>How-To-Repeat:
/opt/gcc/bin/g++ -c -o /dev/null /tmp/gcc_parse_bug.ii
/tmp/gcc_parse_bug.ii: In function `void ns::test()':
/tmp/gcc_parse_bug.ii:12: parse error before `<<' token
>Fix:
Workaround: C((0, ::ns::ci)) << 1;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list