This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 42966 add some indication that a warning has been converted to an error
Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> writes:
| On 26 February 2010 11:45, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
| > Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> writes:
| >
| > | With -fdiagnostics-show-option, this patch adds [-Werror=option] to
| > | warnings converted to errors. For default warnings (those not assigned
| > | to any option), it adds [enabled by default]. For default warnings
| > | converted to errors it adds [-Werror]. For warnings not converted to
| > | errors, the output remains the same, that is, [-Woption].
| >
| > does the testsuite show any regression (because of the new suffix)?
|
| No, the testsuite is run without fdiagnostics-show-option. However,
| from my tests I know that a few tests would fail (independently of
| this patch) because the name of the option matches with some dg-bogus
| regexps, for example in Wconversion-integer we have some tests like:
|
| unsigned int i = -1; /* { dg-warning "negative integer converted to
| unsigned type" } */ /* { dg-bogus "conversion" }*/
|
| Since the first warning is emitted by -Wconversion, then with
| -fdiagnostics-show-option the dg-bogus fails. We could fix this by
| improving the "conversion" regexp, but I think this is unnecessary
| right now unless we want to enable -fdiagnostics-show-option by
| default (which this patch doesn't do but we may consider for GCC 4.6).
Thanks for the analysis. Let's see how people feel about
the default for 4.6.
-- Gaby