This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Make parser revert digraph "<:"


Mark Mitchell <mark@codesourcery.com> writes:

| Giovanni Bajo wrote:
| 
| >Hello Mark,
| >
| >this patch makes the parser aware that "<:" is a digraph for "[". In other
| >words, if the parser sees "A[:0>", where A is a template, it will parse it as
| >"A< ::0>", and will emit the following diagnostic:
| >
| I think that we should only emit this diagnostic if a digraph really
| was present,

Agreed.  That is what I tried to say in words, and later in symbols
with

     vector<::foo> x;
     vector[:foo> y;

Doing that requires to test whether token-value('[') was spelt '<:'.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]