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: [gfortran] Silence GNU extension warnings with -std=gnu


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.


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