This is the mail archive of the gcc-bugs@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: Preprocessor keyword #echo is missing


Hello zw,

Thanks for the reply.

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.
I am using this currently, an #echo solution would be a better way to resolve this though.

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.
It would be useful in other situations than testing, Makefiles are full of "echo" calls, however there is no ideal solution for the preprocessor.


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.
OK, well would you consider that #echo would be a useful addition to the GCC preprocessor language? I personally do and I can not believe I am the only one who sees this gap that needs filling.

Regards

JG


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