This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Make parser revert digraph "<:"
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Giovanni Bajo" <giovannibajo at libero dot it>
- Cc: "Theodore Papadopoulo" <Theodore dot Papadopoulo at sophia dot inria dot fr>, <gcc-patches at gcc dot gnu dot org>
- Date: 27 Jan 2004 00:36:47 +0100
- Subject: Re: [C++ PATCH] Make parser revert digraph "<:"
- Organization: Integrable Solutions
- References: <200401261837.i0QIbwEX025367@mururoa.inria.fr><134101c3e453$ec6ada30$62b92997@bagio>
"Giovanni Bajo" <giovannibajo@libero.it> writes:
| Theodore Papadopoulo wrote:
|
| > What I dislike with your patch (and I think what Gaby and other
| > dislike also) is that I will also have a message if I wrote "A[:B>".
| > Ie, as far as I understand, seeing the token sequence
| > <square bracket><:> you assume that the code contained "<::" which
| > will not be true if the code actually contained "[:".
|
| No, it will *try* parsing it, but fall back to the normal parsing if it can't
| find a syntactically-correct template argument list after it.
Yes, but
struct S { };
vector[:S> v;
is not intended to be supported. That is the whole you seem to be
missing. See Mark's message about accepting/issueing a diagnostic
only if it were '<::'.
-- Gaby