This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch, fortran] Handle -Wextra, -fcompare-reals is implied with -Wextra
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, manu at gcc dot gnu dot org
- Date: Sun, 23 Sep 2012 23:46:29 +0200
- Subject: Re: [patch, fortran] Handle -Wextra, -fcompare-reals is implied with -Wextra
- References: <505F69DF.5090706@netcologne.de>
On 23 September 2012 21:58, Thomas Koenig <tkoenig@netcologne.de> wrote:
> Hello world,
>
> the attatched patch (this time for real!) implements
> -Wextra for the Fortran front end, and adds -fcompare-reals
> to -Wextra.
>
> @manu: In the PR, you mentioned that it would be nice if
> LangEnabledBy was used in the opt files. I tried adding that
> to the common.opt file for Wextra, but that led to the following
> regressions:
The usage should be to add LangEnabledBy(Fortran,Wextra) to
fortran/lang.opt, see the examples in c-family/c.opt. However, the
actual problem seems to be that gfortran uses their own option
variables and not the ones generated by the common machinery (which
are generated in any case, so it is a bit of a waste to duplicate
them).
It is up to the gfortran maintainers to enforce using the common
machinery or keep re-inventing the wheel. If gfortran wants to ever
support -Werror= and #pragma GCC diagnostics and other such goodies,
all this code will need to be eventually moved to the common machinery
(or duplicate the features in the Fortran FE).
Cheers,
Manuel.