This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Silence GNU extension warnings with -std=gnu
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Roger Sayle <roger at eyesopen dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 May 2004 11:59:22 +0100
- Subject: Re: [gfortran] Silence GNU extension warnings with -std=gnu
- Organization: CodeSourcery
- References: <Pine.LNX.4.44.0405222044510.24088-100000@www.eyesopen.com>
On Sunday 23 May 2004 04:06, Roger Sayle wrote:
> I'd like to propose the single line patch to the gfortran front-end.
> Currently the gfortran compiler issues a warning for each use of a
> GNU fortran extension, both by default and also when the user explicitly
> specifies -std=gnu. This behaves differently from -std=f2003, for
> example, where we warn about use of f2003 extensions by default, but
> silence them when the -std=f2003 command line option is given. The
> single line change below, keeps these options consistent and prevents
> warning about GNU extensions when using -std=gnu.
>
> The following patch has been tested on i686-pc-linux-gnu with a full
> bootstrap, including gfortran, and regression tested with a top-level
> "make -k check" with no new failures.
>
> Thoughts? Ok for mainline?
No, or at least not in its current form. This patch introduces a fourth
"standard" variant. It's no longer possible to explicitly select the default.
Maybe it would be better to introduce new option (eg. -Wnonstandard or
-Wextension) to disable these warnings? Either that or tie them to -pedantic.
Paul
> 2004-05-22 Roger Sayle <roger@eyesopen.com>
>
> * options.c (gfc_handle_option): Don't warn about the use of
> GNU extensions when the user explicitly specifies -std=gnu.