This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessor keyword #echo is missing
"J. Grant" <now3d@gmx.net> writes:
> platsdl.c:221:2: warning: #warning start (PLATFORM_WSDL ||
> PLATFORM_LSDL) 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
Frankly I do not consider the elimination of that extra text to be
sufficient justification for adding another directive. You can do
gcc ... 2>&1 | sed -e 's/warning: #warning //' if it really bugs you.
> ... #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.
If this is for your own personal testing, why does it matter whether
it is formally correct to call it a warning? You get the message on
your tty and compilation proceeds; that's what matters.
>> What other compilers are you familiar with that support #echo?
...
> http://falcon.rdo.vcu.edu/~mcnpinfo/dcomment/manual/node5.html
This is specifically *not* a C preprocessor, it's a generic file
processor with a similar control language.
zw