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
This commit is contained in:
Roger Sayle 2003-03-15 19:17:50 +00:00 committed by Roger Sayle
parent 24b26d8d19
commit de6a669be0
5 changed files with 17 additions and 24 deletions

View File

@ -1,3 +1,11 @@
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.

View File

@ -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;

View File

@ -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;

View File

@ -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*-*-*.

View File

@ -0,0 +1,3 @@
PRINT 10, 2, 3
10 FORMAT (I1, X, I1)
END