On 09/08/2016 20:30, Manuel López-Ibáñez wrote: >> >> >> + cpp_opts->warn_expansion_to_defined = cpp_warn_expansion_to_defined; >> + if (cpp_warn_expansion_to_defined == -1) >> + cpp_warn_expansion_to_defined = pedantic || extra_warnings; >> + > > Instead of the above, plase use LangEnabledBy() or EnabledBy() in c.opt. > See Wendif-labels and other examples. Then, you do not need Init(-1).
This causes this to produce an error if -pedantic-errors is provided, because -pedantic-errors does control_warning_option (OPT_Wpedantic, DK_ERROR, NULL, value, loc, lang_mask, handlers, opts, opts_set, dc); and this enables -Wexpansion-to-defined at DK_ERROR level. Bug or fix? Paolo