From: Roger Sayle Date: Sat, 15 Mar 2003 19:17:50 +0000 (+0000) Subject: stb.c (ffestb_R100110_): Allow the number before the X format to be optional when... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de6a669be0c301912d3ff1b00aed3bf0e0a115f2;p=gcc.git 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 --- diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 0166c195b74..73eddc137e3 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,11 @@ +2003-03-15 Roger Sayle + + * 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 * f/ste.c (ffeste_R810): Fix whitespace. diff --git a/gcc/f/stb.c b/gcc/f/stb.c index bf456a1afc1..57d7ac33313 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 bd2add21f65..c9ff189b796 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 793c793fbfb..92db48b9438 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-03-15 Roger Sayle + + * g77.f-torture/compile/xformat.f: New test case. + 2003-03-15 John David Anglin * 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 00000000000..7e9001c4bc1 --- /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