Preprocessing & #error

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

 



Here is some code.

====== C code : foo.c : BEGIN ======
#define ITEM1 100
#define ITEM2 200
#if (ITEM1 != ITEM2)
#error BUG : ITEM1 != ITEM2
#endif
====== C code : foo.c : END ========

====== Compilation (Preprocessing) : BEGIN ======

$ gcc -v
[---omitted---]
gcc version 3.3.1 (cygming special)

$ gcc foo.c
foo.c:4:2: #error BUG : ITEM1 != ITEM2

====== Compilation (Preprocessing) : END ========


I would like to get the following output :
$ gcc foo.c
foo.c:4:2: #error BUG : 100 != 200


Is it possible?


   =====================================
   Alex Vinokur
     mailto:alexvn@xxxxxxxxxx
     http://mathforum.org/library/view/10978.html
   =====================================








[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