This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Parse error with scope-resolution operator
- To: Richard dot Kreckel at uni-mainz dot de
- Subject: Re: Parse error with scope-resolution operator
- From: Gabriel Dos Reis <gdr at codesourcery dot coom>
- Date: 10 Jul 2000 18:12:18 +0200
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <Pine.LNX.3.96.1000710173846.23774A-100000@higgs.physik.uni-mainz.de>
"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