From: Nick Clifton Date: Tue, 14 May 2024 14:30:52 +0000 (+0100) Subject: Fix gas's 'macro count' test for various targets X-Git-Tag: gdb-15-branchpoint~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9a16391e8fa89cb986b0788040f59cb8a089e81;p=thirdparty%2Fbinutils-gdb.git Fix gas's 'macro count' test for various targets --- diff --git a/gas/app.c b/gas/app.c index 3fd3765fcf9..041941a1926 100644 --- a/gas/app.c +++ b/gas/app.c @@ -686,6 +686,11 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen) PUT (quotechar); continue; + /* These two are used inside macros. */ + case '@': + case '+': + break; + case '"': case '\\': case 'b': diff --git a/gas/testsuite/gas/macros/count.s b/gas/testsuite/gas/macros/count.s index 650a416f6fa..c752ca8367d 100644 --- a/gas/testsuite/gas/macros/count.s +++ b/gas/testsuite/gas/macros/count.s @@ -1,19 +1,19 @@ -.macro mac1 count=10 + .macro mac1 count .print "\@" .print "\+" -.if \count > 1 + .if \count > 1 mac1 \count-1 -.endif -.endm + .endif + .endm -.macro mac2 count=100 + .macro mac2 count .print "\@" .print "\+" -.if \count > 1 + .if \count > 1 mac2 \count-1 -.endif -.endm + .endif + .endm -mac1 2 -mac2 3 + mac1 2 + mac2 3