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]

Re: turning off warning messages in the source code


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;


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