This is the mail archive of the gcc-help@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]

Preprocessing & #error


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@connect.to
     http://mathforum.org/library/view/10978.html
   =====================================








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