This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New cpp0 warning in 3.1 breaks configure (autoconf)
On Tue, Jun 11, 2002 at 07:58:54PM -0300, Alexandre Oliva wrote:
> On Jun 11, 2002, Marc Espie <espie@quatramaran.ens.fr> wrote:
> > In article <200206112213.g5BMDp3L044244@latour.rsch.comm.mot.com> you write:
> >> I think the current behavior is worth defending since skipping fixed
> >> system headers can cause serve cascading problems that are hard to
> >> debug by the user.
>
> > Of course, this does assume the compiler and fixincludes are always right.
>
> -I/usr/include is always wrong. -isystem /usr/include might be
> acceptable.
Let me throw out an idea:
Ignore -I/usr/include. Silently, even. Warn only if -Wfoo is given
(for whatever value of foo).
More generally, ignore -I's of STANDARD_INCLUDE_DIR ("/usr/include"
by default). Or maybe, anything in the cpp_include_defaults array.
Give a diagnostic only if the user asks for one, because otherwise there
is nothing the user can do about it.
We can recover from parsing errors and continue. Why can't we recover from
command-line user errors and continue?
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams