This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, fortran] Handle -Wextra, -fcompare-reals is implied with -Wextra


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]