Preprocessor keyword #echo is missing

J. Grant now3d@gmx.net
Fri Jan 24 02:21:00 GMT 2003


Hello,

> Er?  You should get exactly what you put after #warning in the warning
> message.  With "warning: " in front of it, true - is that what you're
> unhappy about?

platsdl.c:221:2: warning: #warning start (PLATFORM_WSDL || 
PLATFORM_LSDL) block
platsdl.c:233:2: warning: #warning start ifndef NO_SDL
platsdl.c:277:2: warning: #warning start ifndef NO_SDL block
platsdl.c:282:2: warning: #warning end ifndef NO_SDL block

Yes, the extra text is "warning: #warning"

Something like as follows would be useful and not take up extra space in 
the output.

platsdl.c:221:2: start (PLATFORM_WSDL || PLATFORM_LSDL) block


> In general we have a preference not to add more extensions to GCC;
> many of us are of the opinion that there are already too many.
> Particularly when the suggestion is to add a new directive, I would
> want to see a thoroughly compelling rationale for it - that means
> something that you can do with it that there's no other way to do.
> Also, a good reason why it should be spelled #echo and not #notice or
> #pragma GCC message "string constant" or something like that, would be
> nice.

Agreed, it is better to consider the options.  Compatiblity with other 
compilers' preprocessors should be noted. #error stops the compilation 
process, #warning is not correct to use, as there is nothing to warn 
about when I am testing code to check the right blocks of code are 
selected by the preprocessor.

> What other compilers are you familiar with that support #echo?

I searched google a few days ago. There were several pages listed with 
#echo as a keyword, so i tested it, this was how I found out it was not 
implemented in GCC.  There must be several compilers using this, maybe 
older UNIX machines, perhaps.

http://falcon.rdo.vcu.edu/~mcnpinfo/dcomment/manual/node5.html


Regards

JG



More information about the Gcc-bugs mailing list