Re: Preprocessing & #error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alex,

>Is it possible?

It is POSSIBLE, but you'd have to write your own pre-pre-processor.  (Perhaps in Perl?)

Without doing to that extra-ordinary effort, it isn't possible with the pre-processor.  AFAIK.

Or you could change the line to read...
#error BUG : 100 != 200
...but I presume that defeats the intent of having the token macro-expanded.

You could also modify your GCC to perform macro expansion on the error line.  That may be more effort than writing your own pre-pre-processor (unless you are already familiar with GCC internals).  And you'd have a custom one-off pre-processor in your GCC.

Pre-processor info here <http://www.delorie.com/gnu/docs/gcc/cpp_62.html>.

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux