This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Fix preprocessor/6517
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org, Zack Weinberg <zack at codesourcery dot com>
- Date: Tue, 21 May 2002 23:40:14 +0100
- Subject: Re: [RFA] Fix preprocessor/6517
- References: <20020521213658.GA30014@daikokuya.demon.co.uk>
Neil Booth wrote:-
> If the preprocessor had a fatal error during option parsing,
> it would set its error count appropriately, but the front end
> was ignoring it (this goes back to 3.0; stand-alone cpp0
> was always fine). This patch causes errorcount to be set
> in the C front ends appropriately after option processing,
> and the compiler to exit if there are any errors after
> option processing.
Incidentally, Zack, this patch makes DL_FATAL almost redundant,
a good sign IMO. All DL_FATAL are in cppinit.c, apart from
one (recursive #include). There are only two DL_ERRORs in
cppinit.c, which have now effectively become DL_FATAL as
far as cc1 is concerned, which are to do with stat issues
other than "no such directory" for include paths. Seems fine
to me.
I think the semantics that clients bail out if there are errors
after processing options, and continue otherwise are sound.
Apart from polling, there is no easy way for a client to know
whether a fatal error has occured (recursive #include is all
that remains anyway).
OK with you to replace DL_FATAL with DL_ERROR everywhere?
Neil.