summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-04 01:36:31 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2006-07-04 01:36:31 +0000
commit02183b453439daa65fc2bb205afef9428f106023 (patch)
treef2a85db2fbef8080a2e4fd3757e25014aaf79285 /libgfortran/runtime
parent3b146c36e3f5c94d0b2f5b3a2a4a9667d573ad4c (diff)
downloadgcc-02183b453439daa65fc2bb205afef9428f106023.tar.gz
2006-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27704 * runtime/error.c (notify_std): Pass common flags into function. Use flags to show locus of error or warning. * libgfortran.h: Add enum try. Add prototype for notify_std. * io/open.c (edit_modes): Allow status="old" and add extension to allow status="scratch" *io/list_read.c (nml_read_obj): Update call to notify_std. *io/io.h: Remove enum try and prototype for notify_std. *io/transfer.c (read_sf): Update call to notify_std. *io/format.c (parse_format_list): Update call to notify_std. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/error.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 8ccb381a650..9960733f16a 100644
--- a/libgfortran/runtime/error.c
+++ b/libgfortran/runtime/error.c
@@ -527,7 +527,7 @@ notification_std (int std)
standard does not contain the requested bits. */
try
-notify_std (int std, const char * message)
+notify_std (st_parameter_common *cmp, int std, const char * message)
{
int warning;
@@ -540,10 +540,15 @@ notify_std (int std, const char * message)
if (!warning)
{
+ recursion_check ();
+ show_locus (cmp);
st_printf ("Fortran runtime error: %s\n", message);
sys_exit (2);
}
else
- st_printf ("Fortran runtime warning: %s\n", message);
+ {
+ show_locus (cmp);
+ st_printf ("Fortran runtime warning: %s\n", message);
+ }
return FAILURE;
}