This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-Wimplicit-function-declaration with C++ warnings
- From: "EXT-Pennington, Dale K" <dale dot k dot pennington at boeing dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 23 Mar 2009 08:47:37 -0500
- Subject: -Wimplicit-function-declaration with C++ warnings
Folks,
I am compiling on a Red Hat System using gcc 4.1.2.
My project has a mix of C and C++ files. .
For safety sake, I want to have the -Wimplicit-function-declaration flag
set so if someone forgets a header, we know about it.
This issue is that I make one set of generic flags that I apply to both
C and C++ compiles. When the above flag is specified and the file is a
C++ file, the compiler emits a warning that the flag is not applicable
to C++. (Which makes sense, as in C++ the language requires it, as
opposed to just being a really useful check).
Due to our existing make setup, I would prefer to not have to make a set
of flags that is only applicable to C compiles, as that would have a
cascade effect on our makefiles. Is there a way to have the compiler not
complain about the flag during C++ compiles, that does not involve
removing it ?
Thanks,
Dale Pennington