turning off warning messages in the source code

John Love-Jensen eljay@adobe.com
Mon Oct 7 05:25:00 GMT 2002


Silly example (forgive the unintentional word wrap) of Gokhan's intriguing
idea.

--- makefile ---
PRAGMA_GCC_FLAG = $(shell grep '// PRAGMA: GCC_FLAG ' $<
| sed -e 's@// PRAGMA: GCC_FLAG @@')

Foo.o : Foo.cpp
    g++ -c -o $@ $(PRAGMA_GCC_FLAG) $<

--- Foo.cpp ---
// PRAGMA: GCC_FLAG -DBING="int bing = 7"
BING;



More information about the Gcc-help mailing list