* Jason Merrill:

> @@ -6159,6 +6153,18 @@ errors by @option{-pedantic-errors}.  For instance:
>  -Wwrite-strings @r{(C++11 or later)}
>  }
>  
> +@opindex fpermissive
> +@item -fpermissive
> +Downgrade some required diagnostics about nonconformant code from
> +errors to warnings.  Thus, using @option{-fpermissive} allows some
> +nonconforming code to compile.  Some C++ diagnostics are controlled
> +only by this flag, but it also downgrades some diagnostics that have
> +their own flag:
> +
> +@gccoptlist{
> +-Wnarrowing @r{(C++)}
> +}
> +
>  @opindex Wall
>  @opindex Wno-all
>  @item -Wall

Does compiling with -Wno-narrowing also accept the obsolete constructs?
The documentation isn't clear about it.  The existing test
gcc/testsuite/g++.dg/cpp0x/initlist55.C suggests it's possible.  Maybe
add an explicit example to the documentation?

What about the impact of -w?

As far as the internal API is concerned, will there be a way to query
whether -Wno-narrowing etc. have been specified?  We could use this in
the C frontend where we might want to run different code in some cases.
Without implicit ints, for example, we know that identifiers at certain
positions must be types, so we can type spelling hints to errors.

Thanks,
Florian

Reply via email to