This is the mail archive of the gcc@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]

Re: C++ alternative tokens in the preprocessor


"Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> writes:

| > This is not a good error message.  It expects the user to know gritty
| > details of the official grammar.  I would much rather see something
| > like
| > 
| > a.cc:1:9: "and" is not a legal macro name in C++
| 
| This is slightly off-topic now, but I was going to make the comment
| that I feel such an error message is inappropriate; in particular,
| that use of the adjective "legal" is.
| 
| I believe it was RMS who once mentioned that the compiler should not
| declare things "illegal"
| (http://gcc.gnu.org/ml/gcc/1999-09n/msg00395.html), with "not legal"
| probably being just as bad.
| 
| I always used "ill-formed", to describe the code and not its authors,
| but that may be a bit technical.

I second your note; I think "ill-formed" or "invalid" may be good
qualifiers. 

-- Gaby
CodeSourcery, LLC                             http://www.codesourcery.com

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