[PATCH] move the computation of C++ warning flags to bfd/warning.m4

Pedro Alves palves@redhat.com
Mon Apr 4 09:42:00 GMT 2016


On 04/03/2016 06:22 PM, tbsaunde+binutils@tbsaunde.org wrote:

> There isn't anything specific to gold about this code, so it would seem to make
> sense to compute C and C++ warning flags in the same place.  This also means
> that anything else that wants C++ warning flags won't have to roll there own.

It might be interesting to look at reusing and unifying with gdb's
gdb/warning.m4.  gdb's version knows to enable each warning iff the compiler
actually supports it, by probing support for each warning, in a loop.
That allows gdb adding newer gcc warnings without hardcoding gcc versions
and/or worry of making older compilers complain about unknown options.
It supports both C and C++ too.

Thanks,
Pedro Alves



More information about the Binutils mailing list