From 158f58e7d3865cf286b6ad8c2874c1029e2d7a03 Mon Sep 17 00:00:00 2001 From: fxcoudert Date: Sun, 19 Feb 2006 21:31:02 +0000 Subject: PR libfortran/21303 * gfortran.h (notification): New enumeration. (gfc_notification_std): Prototype for the new function. * error.c (gfc_notification_std): New function. * io.c (check_format): Handle the case of a L format descriptor without a width. * runtime/error.c (notification_std): New function. * libgfortran.h (notification): New enumeration. * io/io.h (notification_std): Prototype for the new function. * io/format.c (parse_format_list): Handle the case of a L format descriptor without a width. * gcc/testsuite/gfortran.dg/fmt_l.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111281 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/error.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'gcc/fortran/error.c') diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index aa23330020c..4c82c4a5498 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -1,6 +1,6 @@ /* Handle errors. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, - Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software + Foundation, Inc. Contributed by Andy Vaught & Niels Kristian Bech Jensen This file is part of GCC. @@ -483,6 +483,22 @@ gfc_warning (const char *nocmsgid, ...) } +/* Whether, for a feature included in a given standard set (GFC_STD_*), + we should issue an error or a warning, or be quiet. */ + +notification +gfc_notification_std (int std) +{ + bool warning; + + warning = ((gfc_option.warn_std & std) != 0) && !inhibit_warnings; + if ((gfc_option.allow_std & std) != 0 && !warning) + return SILENT; + + return warning ? WARNING : ERROR; +} + + /* Possibly issue a warning/error about use of a nonstandard (or deleted) feature. An error/warning will be issued if the currently selected standard does not contain the requested bits. Return FAILURE if -- cgit v1.2.1