|
From: Nicholas N. <nj...@ca...> - 2003-04-07 13:32:24
|
On Fri, 4 Apr 2003, Julian Seward wrote: > > BTW, its #warn, not #warning. > > gcc didn't yelp about #warning when I tested, so is #warning OK or not? With #warning, I get a message like this if I #include valgrind.h: In file included from a.c:2: include/valgrind.h:64:4: warning: #warning For valgrind versions 1.9.0 and after, include/valgrind.h:65:4: warning: #warning you should not include valgrind.h directly. include/valgrind.h:66:4: warning: #warning Instead include the .h relevant to the skin include/valgrind.h:67:4: warning: #warning you want to use. For most people this means include/valgrind.h:68:4: warning: #warning you need to include memcheck.h instead of include/valgrind.h:69:4: warning: #warning valgrind.h. include/valgrind.h:70:4: #error Compilation of your source will now abort. It's a little odd that it says "warning: #warning" instead of just "warning: ", but it works. With #warn, it doesn't work: include/valgrind.h:64:4: invalid preprocessing directive #warn include/valgrind.h:65:4: invalid preprocessing directive #warn include/valgrind.h:66:4: invalid preprocessing directive #warn include/valgrind.h:67:4: invalid preprocessing directive #warn include/valgrind.h:68:4: invalid preprocessing directive #warn include/valgrind.h:69:4: invalid preprocessing directive #warn include/valgrind.h:70:4: #error Compilation of your source will now abort. This is with gcc 2.96 and 3.0.4. N |