On 11/13/23 06:09, Florian Weimer wrote:
It turns out that permerror_opt is not directly usable for
-fpermissive in the C front end.  The front end uses pedwarn
extensively, and pedwarns are not overridable by -Wno-* options,
yet permerrors are.  Add new pedpermerror helpers that turn into
pedwarns if -pedantic-errors is active.

Due to the dependency on flag_pedantic_errors, the new helpers
are specific to the C-family front ends.  For implementing the
rich location variant, export emit_diagnostic_valist from
gcc/diagnostic.cc in parallel to its location_t variant.

gcc/

        * diagnostic-core.h (emit_diagnostic_valist): Declare function.
        * diagnostic.cc (emit_diagnostic_valist): Define it.

gcc/c-family/

        * c-common.h (pedpermerror): Declare functions.
        * c-warn.cc (pedpermerror): Define them.
OK
jeff

Reply via email to