aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog7
-rw-r--r--libgfortran/libgfortran.h4
-rw-r--r--libgfortran/runtime/error.c10
3 files changed, 17 insertions, 4 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index b77eeef..46f7282 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,5 +1,12 @@
2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ PR fortran/31270
+ * runtime/error.c (runtime_error_at): Add a variable number of
+ arguments.
+ * libgfortran.h (runtime_error_at): Update prototype.
+
+2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
PR fortran/32933
* intrinsics/associated.c: Change return type of associated into
a C int.
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index ce6d621..c32b5a3 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -599,8 +599,8 @@ extern void runtime_error (const char *, ...)
__attribute__ ((noreturn, format (printf, 1, 2)));
iexport_proto(runtime_error);
-extern void runtime_error_at (const char *, const char *)
-__attribute__ ((noreturn));
+extern void runtime_error_at (const char *, const char *, ...)
+ __attribute__ ((noreturn, format (printf, 2, 3)));
iexport_proto(runtime_error_at);
extern void internal_error (st_parameter_common *, const char *)
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 4dda227..3512ab4 100644
--- a/libgfortran/runtime/error.c
+++ b/libgfortran/runtime/error.c
@@ -267,11 +267,17 @@ iexport(runtime_error);
* run time error generated by the front end compiler. */
void
-runtime_error_at (const char *where, const char *message)
+runtime_error_at (const char *where, const char *message, ...)
{
+ va_list ap;
+
recursion_check ();
st_printf ("%s\n", where);
- st_printf ("Fortran runtime error: %s\n", message);
+ st_printf ("Fortran runtime error: ");
+ va_start (ap, message);
+ st_vprintf (message, ap);
+ va_end (ap);
+ st_printf ("\n");
sys_exit (2);
}
iexport(runtime_error_at);