diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-19 21:31:02 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-19 21:31:02 +0000 |
commit | 158f58e7d3865cf286b6ad8c2874c1029e2d7a03 (patch) | |
tree | 0f202b9e85194d9bc5ec4b762d158c3dabb04d2c /gcc/fortran/error.c | |
parent | 7a3a84aec5ac9113c6c75eda5cb8960b3bf5ce5d (diff) | |
download | gcc-158f58e7d3865cf286b6ad8c2874c1029e2d7a03.tar.gz |
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
Diffstat (limited to 'gcc/fortran/error.c')
-rw-r--r-- | gcc/fortran/error.c | 20 |
1 files changed, 18 insertions, 2 deletions
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 |