This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enhancement patch for cpp
- To: Ben Elliston <bje at cygnus dot com>
- Subject: Re: Enhancement patch for cpp
- From: Zack Weinberg <zack at rabi dot columbia dot edu>
- Date: Wed, 20 Jan 1999 12:08:02 -0500
- cc: egcs-patches at cygnus dot com
On 20 Jan 1999 13:17:14 +0100, Ben Elliston wrote:
>zack@rabi.columbia.edu (Zack Weinberg) writes:
>
>> I meant that the warnings are repeated for each compiler invocation.
>> For even a small number of source (.c) files in a package, that would
>> get annoying fast.
>
>So does compiling applications that use /usr/include/X11 when the
>function prototypes assume the `int' return type! Nevertheless, the
>warnings are correct.
>
>The problem I had with adding a `-Wmissing-include-dirs' flag was that
>the warning is most sensibly issued as the -I arguments are process.
>Unless the -W warning option is used before the -I options on the
>command line, the warning will not fire.
>
>Without adding explicit code to walk through the include search path
>*after* argument processing, adding a -W switch seems
>unworkable. Suggestions?
Well, actually cpplib does have code to walk the include search path
after argument processing - look at merge_include_chains in
cppfiles.c. I was planning to make that function do most of what
append_include_chain does now anyway, it would be easy to hook the -W
option in there too.
zw