This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use "[warning enabled by default]" for default warnings
- From: Robert Dewar <dewar at adacore dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Arnaud Charlet <charlet at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, rdsandiford at googlemail dot com
- Date: Tue, 11 Feb 2014 07:04:50 -0500
- Subject: Re: Use "[warning enabled by default]" for default warnings
- Authentication-results: sourceware.org; auth=none
- References: <87eh3c3vl1 dot fsf at talisman dot default> <20140209200926 dot GA4940 at adacore dot com> <52F7E0D2 dot 3070307 at adacore dot com> <87zjm02fy5 dot fsf at talisman dot default> <52F7E578 dot 8010805 at adacore dot com> <CAFiYyc1a6sQxvEkQ55gFwLM8qt81wKsGgLZX-VzHs9anH4WLUg at mail dot gmail dot com> <87zjlydltr dot fsf at talisman dot default>
On 2/11/2014 4:45 AM, Richard Sandiford wrote:
OK, this version drops the "[enabled by default]" altogether.
Tested as before. OK to install?
Still a huge earthquake in terms of affecting test suites and
baselines of many users. is it really worth it? In the case of
GNAT we have only recently started tagging messages in this
way, so changes would not be so disruptive, and we can debate
following whatever gcc does, but I think it is important to
understand that any change in this area is a big one in terms
of impact on users.
Thanks,
Richard
gcc/
* opts.c (option_name): Remove "enabled by default" rider.
gcc/testsuite/
* gcc.dg/gomp/simd-clones-5.c: Update comment for new warning message.
Index: gcc/opts.c
===================================================================
--- gcc/opts.c 2014-02-10 20:36:32.380197329 +0000
+++ gcc/opts.c 2014-02-10 20:58:45.894502379 +0000
@@ -2216,14 +2216,10 @@ option_name (diagnostic_context *context
return xstrdup (cl_options[option_index].opt_text);
}
/* A warning without option classified as an error. */
- else if (orig_diag_kind == DK_WARNING || orig_diag_kind == DK_PEDWARN
- || diag_kind == DK_WARNING)
- {
- if (context->warning_as_error_requested)
- return xstrdup (cl_options[OPT_Werror].opt_text);
- else
- return xstrdup (_("enabled by default"));
- }
+ else if ((orig_diag_kind == DK_WARNING || orig_diag_kind == DK_PEDWARN
+ || diag_kind == DK_WARNING)
+ && context->warning_as_error_requested)
+ return xstrdup (cl_options[OPT_Werror].opt_text);
else
return NULL;
}
Index: gcc/testsuite/gcc.dg/gomp/simd-clones-5.c
===================================================================
--- gcc/testsuite/gcc.dg/gomp/simd-clones-5.c 2014-02-10 20:36:32.380197329 +0000
+++ gcc/testsuite/gcc.dg/gomp/simd-clones-5.c 2014-02-10 21:00:32.549412313 +0000
@@ -3,7 +3,7 @@
/* ?? The -w above is to inhibit the following warning for now:
a.c:2:6: warning: AVX vector argument without AVX enabled changes
- the ABI [enabled by default]. */
+ the ABI. */
#pragma omp declare simd notinbranch simdlen(4)
void foo (int *a)