warn_return_type = value;
warn_sequence_point = value; /* Was C only. */
warn_switch = value;
- set_Wstrict_aliasing (value);
+ if (warn_strict_aliasing == -1)
+ set_Wstrict_aliasing (value);
warn_address = value;
- warn_strict_overflow = value;
+ if (warn_strict_overflow == -1)
+ warn_strict_overflow = value;
warn_array_bounds = value;
/* Only warn about unknown pragmas that are not in system
if (warn_pointer_sign == -1)
warn_pointer_sign = 0;
+ if (warn_strict_aliasing == -1)
+ warn_strict_aliasing = 0;
+ if (warn_strict_overflow == -1)
+ warn_strict_overflow = 0;
+
/* -Woverlength-strings is off by default, but is enabled by -pedantic.
It is never enabled in C++, as the minimum limit is not normative
in that standard. */
if (!flag_permissive)
{
flag_pedantic_errors = 1;
- cpp_opts->pedantic_errors = 1;
+ /* FIXME: For consistency pedantic_errors should have the
+ same value in the front-end and in CPP. However, this
+ will break existing applications. The right fix is
+ disentagle flag_permissive from flag_pedantic_errors,
+ create a new diagnostic function permerror that is
+ controlled by flag_permissive and convert most C++
+ pedwarns to this new function.
+ cpp_opts->pedantic_errors = 1; */
}
if (!flag_no_inline)
{