summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgfortran/ChangeLog9
-rw-r--r--libgfortran/io/format.c4
-rw-r--r--libgfortran/libgfortran.h4
-rw-r--r--libgfortran/runtime/error.c6
4 files changed, 17 insertions, 6 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 4f59525332e..8162fa0fcc8 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,12 @@
+2010-03-12 Kai Tietz <kai.tietz@onevision.com>
+
+ PR/42950
+ * io/format.c (parse_format_list): Add to ERROR, WARNING,
+ SILENT enumerators NOTIFICATION_ prefix.
+ * runtime/error.c (notification_std): Likewise.
+ * libgfortran.h (notification): Likewise.
+ (GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16.
+
2010-03-11 Tobias Burnus <burnus@net-b.de>
PR fortran/43228
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index 68b9e992d6d..461b179e53a 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -863,7 +863,7 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok)
t = format_lex (fmt);
if (t != FMT_POSINT)
{
- if (notification_std(GFC_STD_GNU) == ERROR)
+ if (notification_std(GFC_STD_GNU) == NOTIFICATION_ERROR)
{
fmt->error = posint_required;
goto finished;
@@ -912,7 +912,7 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok)
u = format_lex (fmt);
if (t == FMT_G && u == FMT_ZERO)
{
- if (notification_std (GFC_STD_F2008) == ERROR
+ if (notification_std (GFC_STD_F2008) == NOTIFICATION_ERROR
|| dtp->u.p.mode == READING)
{
fmt->error = zero_width;
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 8d1fa4dfec1..6e47a25b22c 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -586,7 +586,7 @@ st_option;
that were given (-std=, -pedantic) we should issue an error, a warning
or nothing. */
typedef enum
-{ SILENT, WARNING, ERROR }
+{ NOTIFICATION_SILENT, NOTIFICATION_WARNING, NOTIFICATION_ERROR }
notification;
/* This is returned by notify_std and several io functions. */
@@ -701,6 +701,8 @@ internal_proto(show_backtrace);
#if defined(HAVE_GFC_REAL_16)
#define GFC_LARGEST_BUF (sizeof (GFC_REAL_16))
+#elif defined(HAVE_GFC_INTEGER_16)
+#define GFC_LARGEST_BUF (sizeof (GFC_INTEGER_LARGEST))
#elif defined(HAVE_GFC_REAL_10)
#define GFC_LARGEST_BUF (sizeof (GFC_REAL_10))
#else
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 07da6df36e4..c3601687c56 100644
--- a/libgfortran/runtime/error.c
+++ b/libgfortran/runtime/error.c
@@ -452,13 +452,13 @@ notification_std (int std)
int warning;
if (!compile_options.pedantic)
- return SILENT;
+ return NOTIFICATION_SILENT;
warning = compile_options.warn_std & std;
if ((compile_options.allow_std & std) != 0 && !warning)
- return SILENT;
+ return NOTIFICATION_SILENT;
- return warning ? WARNING : ERROR;
+ return warning ? NOTIFICATION_WARNING : NOTIFICATION_ERROR;
}