This is the mail archive of the gcc-patches@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]

Re: [RFA] Fix preprocessor/6517


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.


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