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 "<:"
"Zack Weinberg" <zack@codesourcery.com> writes:
| > No. If digraphs were intended not to be supported at all then there
| > would have been a statement to abolish them. That is not the case.
|
| I think you missed my point. Evolution WG wants ideas how to deal
| with a conflict between template grammar and greedy lexing. *I* was
| suggesting that it would help if di- and tri-graphs were optionally
| abolishable.
And I don't think I missed that. I'm saying that suggestion is a
non-starter. We specifically want to diminish the proliferation of
dialects.
| > Rather, it is intented that in this specific case, '<::' be lexed
| > as < ::. That is different from throwing random pragmas in.
|
| Okay, but are there not other such problems, or are <:: and >> the
| only trouble spots?
They are the only troublesome CPP notions we're aware of to date.
| > Second, I disagree that "pragma" (or dogma or whatever CPP thingy
| > it is) is a programmer control; at least as far as C++ is conerned.
|
| If you want to pretend the preprocessor doesn't exist, fine, but
| #pragma is the best way within the scope of the standard to express
| this sort of global syntactic control.
I don't pretend that CPP does not exist, and nothing I said previously
can lead to that nonsense (in fact, I've specifically talked about use
of CPP in some C++ codes). I do recognize its existance and its
nuisance -- and another proposal we're working on is to limit its
reach of damage (sadly enough, it would require enhancing CPP, but
that is another story).
However, I strongly disagree with your assertion is that it gives
C++ programmers control. It simply does not. The only thing it can do
is add another level of obfuscation and non-portability.
-- Gaby