Currently we make -Wnarrowing an error by default by forcing pedantic_errors
on, but for consistency -fpermissive should prevent that.
In general I'm inclined to move away from using permerror in favor of this
kind of model, with specific flags for each diagnostic.
gcc/cp/ChangeLog:
* typeck2.cc (check_narrowing): Check flag_permissive.
else if (complain & tf_error)
{
int savederrorcount = errorcount;
- global_dc->pedantic_errors = 1;
+ if (!flag_permissive)
+ global_dc->pedantic_errors = 1;
auto s = make_temp_override (global_dc->dc_warn_system_headers, true);
pedwarn (loc, OPT_Wnarrowing,
"narrowing conversion of %qE from %qH to %qI",