aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-03-15 19:17:50 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-03-15 19:17:50 +0000
commitde6a669be0c301912d3ff1b00aed3bf0e0a115f2 (patch)
tree2ed816297b34220f53d26d2d9d3ca58af3c3462f /gcc
parent24b26d8d19323c4d8f8ea11a5d01828e4eff40e3 (diff)
downloadgcc-de6a669be0c301912d3ff1b00aed3bf0e0a115f2.zip
gcc-de6a669be0c301912d3ff1b00aed3bf0e0a115f2.tar.gz
gcc-de6a669be0c301912d3ff1b00aed3bf0e0a115f2.tar.bz2
stb.c (ffestb_R100110_): Allow the number before the X format to be optional when not -fpedantic.
* stb.c (ffestb_R100110_): Allow the number before the X format to be optional when not -fpedantic. * std.c (ffestd_R1001dump_1010_3_): Delete unused static function. (ffestd_R1001dump_): For the FFESTP_formattypeX case, call ffestd_R1001dump_1010_2_ instead of ffestd_R1001dump_1010_3_. * g77.f-torture/compile/xformat.f: New test case. From-SVN: r64415
Diffstat (limited to 'gcc')
-rw-r--r--gcc/f/ChangeLog8
-rw-r--r--gcc/f/stb.c2
-rw-r--r--gcc/f/std.c24
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g77.f-torture/compile/xformat.f3
5 files changed, 17 insertions, 24 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 0166c19..73eddc1 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,5 +1,13 @@
2003-03-15 Roger Sayle <roger@eyesopen.com>
+ * stb.c (ffestb_R100110_): Allow the number before the X format
+ to be optional when not -fpedantic.
+ * std.c (ffestd_R1001dump_1010_3_): Delete unused static function.
+ (ffestd_R1001dump_): For the FFESTP_formattypeX case, call
+ ffestd_R1001dump_1010_2_ instead of ffestd_R1001dump_1010_3_.
+
+2003-03-15 Roger Sayle <roger@eyesopen.com>
+
* f/ste.c (ffeste_R810): Fix whitespace.
2003-03-15 Andreas Jaeger <aj@suse.de>
diff --git a/gcc/f/stb.c b/gcc/f/stb.c
index bf456a1..57d7ac3 100644
--- a/gcc/f/stb.c
+++ b/gcc/f/stb.c
@@ -10514,7 +10514,7 @@ ffestb_R100110_ (ffelexToken t)
case FFESTP_formattypeX:
err = FFEBAD_FORMAT_BAD_X_SPEC;
- pre = required;
+ pre = ffe_is_pedantic() ? required : optional;
post = disallowed;
dot = disallowed;
exp = disallowed;
diff --git a/gcc/f/std.c b/gcc/f/std.c
index bd2add2..c9ff189 100644
--- a/gcc/f/std.c
+++ b/gcc/f/std.c
@@ -532,8 +532,6 @@ static void ffestd_R1001dump_1010_1_ (ffests s, ffesttFormatList f,
const char *string);
static void ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f,
const char *string);
-static void ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f,
- const char *string);
static void ffestd_R1001dump_1010_4_ (ffests s, ffesttFormatList f,
const char *string);
static void ffestd_R1001dump_1010_5_ (ffests s, ffesttFormatList f,
@@ -3608,7 +3606,7 @@ ffestd_R1001dump_ (ffests s, ffesttFormatList list)
break;
case FFESTP_formattypeX:
- ffestd_R1001dump_1010_3_ (s, next, "X");
+ ffestd_R1001dump_1010_2_ (s, next, "X");
break;
case FFESTP_formattypeS:
@@ -3914,26 +3912,6 @@ ffestd_R1001dump_1010_2_ (ffests s, ffesttFormatList f, const char *string)
ffests_puts (s, string);
}
-/* ffestd_R1001dump_1010_3_ -- Dump a particular format
-
- ffesttFormatList f;
- ffestd_R1001dump_1010_3_(f,"I");
-
- The format is dumped with form nX. */
-
-static void
-ffestd_R1001dump_1010_3_ (ffests s, ffesttFormatList f, const char *string)
-{
- assert (f->u.R1010.val.present);
-
- if (f->u.R1010.val.rtexpr)
- ffestd_R1001rtexpr_ (s, f, f->u.R1010.val.u.expr);
- else
- ffests_printf (s, "%lu", f->u.R1010.val.u.unsigned_val);
-
- ffests_puts (s, string);
-}
-
/* ffestd_R1001dump_1010_4_ -- Dump a particular format
ffesttFormatList f;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 793c793..92db48b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2003-03-15 Roger Sayle <roger@eyesopen.com>
+
+ * g77.f-torture/compile/xformat.f: New test case.
+
2003-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* g++.old-deja/g++.mike/eh33.C: Remove xfail for hppa*-*-*.
diff --git a/gcc/testsuite/g77.f-torture/compile/xformat.f b/gcc/testsuite/g77.f-torture/compile/xformat.f
new file mode 100644
index 0000000..7e9001c
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/compile/xformat.f
@@ -0,0 +1,3 @@
+ PRINT 10, 2, 3
+10 FORMAT (I1, X, I1)
+ END