This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: turning off warning messages in the source code
- From: John Love-Jensen <eljay at adobe dot com>
- To: <gcc-help at gnu dot org>, "Ciaran O'Riordan" <ciaran_o_riordan at hotmail dot com>
- Date: Mon, 07 Oct 2002 07:16:57 -0500
- Subject: 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;