On 19/05/21 11:51 -0600, Martin Sebor wrote:
On 5/19/21 10:39 AM, Jonathan Wakely via Gcc-patches wrote:
Jakub pointed out I'd forgotten the spaces before the opening parens
for function calls. The attached patch should fix all those, with no
other changes.

Tested x86_64-linux. OK for trunk?

Looks good to me, it just needs an update to the manual describing
the new options.

It's too bad that the conditionals checking for the dialect have
to be repeated throughout the front end.  They're implied by
the new option enumerator passed to pedwarn().  If the diagnostic
subsystem had access to cxx_dialect the check could be done there
and all the other conditionals could be avoided.  An alternative
to that would be to add a new wrapper to the C++ front end, like
cxxdialect_pedwarn, to do the checking before calling pedwarn
(or, more likely, emit_diagnostic_valist).

btw I did try adding that new wrapper, but it got complicated when I
needed to overload it for both location_t and richloc* (and also
overload all the forwarding wrappers for each cxx dialect that used
it). I gave up and reverted everything.

Maybe I'll try that again another day, but for now I just need to be
able to disable some of these warnings with -Wno-xxx, because they're
not currently controllable by any option.


Reply via email to