This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: What is this gas macro?
On Tue, Aug 27, 2002 at 08:42:14AM -0700, Ian Lance Taylor wrote:
> ONLY_STANDARD_ESCAPES also appears in read.c.
Oh. Yes. I should have looked more carefully before posting.
> > I'm inclined to remove all ocurrences of IGNORE_NONSTANDARD_ESCAPES
> > so that gas silently ignores such escapes rather than emitting
> > a warning. Comments?
>
> Seems reasonable to me.
Allows gas/testsuite/gas/macros/strings.s to pass on more targets.
gas/ChangeLog
* app.c (do_scrub_chars): Don't test IGNORE_NONSTANDARD_ESCAPES. Tidy.
gas/testsuite/ChangeLog
* gas/macros/macros.exp (strings): Update xfails.
Index: gas/app.c
===================================================================
RCS file: /cvs/src/src/gas/app.c,v
retrieving revision 1.19
diff -u -p -r1.19 app.c
--- gas/app.c 18 May 2002 12:53:30 -0000 1.19
+++ gas/app.c 27 Aug 2002 22:22:40 -0000
@@ -611,6 +611,11 @@ do_scrub_chars (get, tostart, tolen)
PUT ('\\');
continue;
+ case EOF:
+ as_warn (_("end of file in string; '\"' inserted"));
+ PUT ('"');
+ continue;
+
case '"':
case '\\':
case 'b':
@@ -630,20 +635,12 @@ do_scrub_chars (get, tostart, tolen)
case '6':
case '7':
break;
-#if defined(IGNORE_NONSTANDARD_ESCAPES) | defined(ONLY_STANDARD_ESCAPES)
+
default:
+#ifdef ONLY_STANDARD_ESCAPES
as_warn (_("unknown escape '\\%c' in string; ignored"), ch);
+#endif
break;
-#else /* ONLY_STANDARD_ESCAPES */
- default:
- /* Accept \x as x for any x */
- break;
-#endif /* ONLY_STANDARD_ESCAPES */
-
- case EOF:
- as_warn (_("end of file in string; '\"' inserted"));
- PUT ('"');
- continue;
}
PUT (ch);
continue;
Index: gas/testsuite/gas/macros/macros.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/macros/macros.exp,v
retrieving revision 1.10
diff -u -p -r1.10 macros.exp
--- gas/testsuite/gas/macros/macros.exp 13 Nov 2001 14:22:44 -0000 1.10
+++ gas/testsuite/gas/macros/macros.exp 27 Aug 2002 22:24:35 -0000
@@ -28,12 +28,13 @@ case $target_triplet in {
if { ![istarget hppa*-*-*] || [istarget *-*-linux*]} {
# FIXME: Due to macro mishandling of ONLY_STANDARD_ESCAPES.
- setup_xfail cris-*-*
- setup_xfail powerpc-*-aix*
- setup_xfail sh*-*-*
- setup_xfail z8k*-*-*
- setup_xfail h8300*-*-*
+ setup_xfail "avr-*" "cris-*"
+
+ # These fail due to NO_STRING_ESCAPES
+ setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*"
+ setup_xfail "powerpc*-*-mpw*" "powerpc*-*-pe" "powerpc*-*-*win*"
+
# FIXME: Due to difference in what "consecutive octets" means.
- setup_xfail *c54x*-*-*
+ setup_xfail "*c54x*-*"
run_dump_test strings
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre