Make driver diagnostics interfaces follow diagnostic.c

Gabriel Dos Reis gdr@integrable-solutions.net
Fri May 28 17:35:00 GMT 2010


On Fri, May 28, 2010 at 12:03 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch adjusts diagnostics interfaces in the driver to follow
> those of diagnostic.c more closely, so making it easier to replace the
> driver's diagnostic code with diagnostic.c.
>
> Various functions are renamed to follow the names in diagnostic.c;
> "notice" becomes "fnotice" with an explicit fp parameter.  The main
> change relates to the "error" function, which was used for all kinds
> of diagnostics; now it is indeed a function for actual errors only and
> will cause the driver to exit with failure status (but not
> immediately; that's fatal_error).  "warning" and "inform" functions
> are added for other kinds of messages.  This required deciding for
> each existing "error" call whether it should indeed be an error or
> another kind of message; I left the bulk as errors.  That will cause
> the driver to exit with error status in some cases where it didn't
> before - at least, for unknown options (which fixes PR 15303; unknown
> options that got passed from the driver to the compiler proper were
> already errors from the compiler proper).
>
> The expected subsequent diagnostics patches after this one are (a)
> actually making the driver use diagnostic.c to replace its own
> diagnostic code and (b) adjusting diagnostics to use GCC formats such
> as %m, %< and %> which they will be able to use once using the common
> code.  Then I can get on to sharing more option processing code
> between the driver and the compiler proper.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  OK to
> commit?

yes, thanks!

-- Gaby



More information about the Gcc-patches mailing list