OSDN Git Service

2010-03-12 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Mar 2010 14:43:55 +0000 (14:43 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Mar 2010 14:43:55 +0000 (14:43 +0000)
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157407 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/format.c
libgfortran/libgfortran.h
libgfortran/runtime/error.c

index 4f59525..8162fa0 100644 (file)
@@ -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
index 68b9e99..461b179 100644 (file)
@@ -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;
index 8d1fa4d..6e47a25 100644 (file)
@@ -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
index 07da6df..c360168 100644 (file)
@@ -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;
 }