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]

-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



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