Parse error with scope-resolution operator
Gabriel Dos Reis
gdr@codesourcery.coom
Mon Jul 10 09:12:00 GMT 2000
"Richard B. Kreckel" <kreckel@ginac.de> writes:
[...]
| int main(void) {
| // (1<::foo()) produces parse error, but should be ok, since we are
| // living in the global namespace. (1>::foo()) works, however.
This is a latent bug in the gcc-2.96 series parser. I came across it a
while ago but forgot to pay attentin to it. The crux of the problem
lies in that, somehow the lexer thinks '<:' is a token.
Obviously the same problem appears in
struct X {};
template<typenanme T> struct Y {};
int main()
{
Y<::X> z;
}
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs
mailing list