From ecce923e1073014b820367e487df93b7c81542fb Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 23 Aug 2004 05:52:37 +0000 Subject: * read-rtl.c (read_rtx): Tidy use of format_ptr. From-SVN: r86403 --- gcc/read-rtl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/read-rtl.c') diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index 57bdfa0..2b9bd91 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -598,8 +598,8 @@ again: else ungetc (i, infile); - for (i = 0; i < GET_RTX_LENGTH (GET_CODE (return_rtx)); i++) - switch (*format_ptr++) + for (i = 0; format_ptr[i] != 0; i++) + switch (format_ptr[i]) { /* 0 means a field for internal use only. Don't expect it to be present in the input. */ @@ -668,7 +668,7 @@ again: /* 'S' fields are optional and should be NULL if no string was given. Also allow normal 's' and 'T' strings to be omitted, treating them in the same way as empty strings. */ - XSTR (return_rtx, i) = (format_ptr[-1] == 'S' ? NULL : ""); + XSTR (return_rtx, i) = (format_ptr[i] == 'S' ? NULL : ""); break; } @@ -676,7 +676,7 @@ again: DEFINE_INSN_AND_SPLIT, or DEFINE_PEEPHOLE automatically gets a star inserted as its first character, if it is written with a brace block instead of a string constant. */ - star_if_braced = (format_ptr[-1] == 'T'); + star_if_braced = (format_ptr[i] == 'T'); stringbuf = read_string (infile, star_if_braced); @@ -741,7 +741,7 @@ again: default: fprintf (stderr, "switch format wrong in rtl.read_rtx(). format was: %c.\n", - format_ptr[-1]); + format_ptr[i]); fprintf (stderr, "\tfile position: %ld\n", ftell (infile)); abort (); } -- cgit v1.1