This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] move the computation of C++ warning flags to bfd/warning.m4
- From: Pedro Alves <palves at redhat dot com>
- To: tbsaunde+binutils at tbsaunde dot org, binutils at sourceware dot org
- Date: Mon, 4 Apr 2016 10:41:50 +0100
- Subject: Re: [PATCH] move the computation of C++ warning flags to bfd/warning.m4
- Authentication-results: sourceware.org; auth=none
- References: <1459704127-16182-1-git-send-email-tbsaunde+binutils at tbsaunde dot org>
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