[Bug c/53075] -Werror=pedantic should be equivalent to -pedantic-errors
kamleshbhalui at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 2 14:41:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53075
Kamlesh Kumar <kamleshbhalui at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kamleshbhalui at gmail dot com
--- Comment #4 from Kamlesh Kumar <kamleshbhalui at gmail dot com> ---
This patch resolves this.
diff --git a/gcc/opts.c b/gcc/opts.c
index 1417dba..2e71fef 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -3212,7 +3212,7 @@ option_name (diagnostic_context *context, int
option_index,
if (option_index)
{
/* A warning classified as an error. */
- if ((orig_diag_kind == DK_WARNING || orig_diag_kind == DK_PEDWARN)
+ if ((context->pedantic_errors || orig_diag_kind == DK_WARNING ||
orig_diag_kind == DK_PEDWARN)
&& diag_kind == DK_ERROR)
return concat (cl_options[OPT_Werror_].opt_text,
/* Skip over "-W". */
More information about the Gcc-bugs
mailing list