summaryrefslogtreecommitdiffstats
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-03 15:22:25 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-03 15:22:25 +0000
commit6a06f1b6290e779615bb53c7ed9a890233b8d205 (patch)
treed6041abde64a2fa3e650a14db834c717c03b2a4c /libgfortran/runtime
parent91cf53d57229fde78340ed7c24e3d07cc5b524eb (diff)
downloadppe42-gcc-6a06f1b6290e779615bb53c7ed9a890233b8d205.tar.gz
ppe42-gcc-6a06f1b6290e779615bb53c7ed9a890233b8d205.zip
2010-11-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/43899 * runtime/error.c (generate_warning): New function to generate a run time warning message. Fix some whitespace. * libgfortran.h: Add prototype for new function. * io/list_read.c (nml_read_obj): Use new function to warn when a character namelist object is truncated. Only warn if compiled with -fbounds-check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166252 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/error.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 65983ad4cb5..1baf9d35d1f 100644
--- a/libgfortran/runtime/error.c
+++ b/libgfortran/runtime/error.c
@@ -443,6 +443,20 @@ generate_error (st_parameter_common *cmp, int family, const char *message)
}
iexport(generate_error);
+
+/* generate_warning()-- Similar to generate_error but just give a warning. */
+
+void
+generate_warning (st_parameter_common *cmp, const char *message)
+{
+ if (message == NULL)
+ message = " ";
+
+ show_locus (cmp);
+ st_printf ("Fortran runtime warning: %s\n", message);
+}
+
+
/* Whether, for a feature included in a given standard set (GFC_STD_*),
we should issue an error or a warning, or be quiet. */
@@ -462,7 +476,6 @@ notification_std (int std)
}
-
/* 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. */
OpenPOWER on IntegriCloud