bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/25750] GNU as has inconsistent behavior when expanding .ma


From: caij2003 at gmail dot com
Subject: [Bug binutils/25750] GNU as has inconsistent behavior when expanding .macro that takes as input directives with arguments
Date: Wed, 08 Apr 2020 21:31:00 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25750

--- Comment #8 from Jian Cai <caij2003 at gmail dot com> ---
Hi Nick,

Thanks for the feedback. First all of, apology and correction to the code
example I came up with in
https://sourceware.org/bugzilla/show_bug.cgi?id=25750#c4. It should be

.macro foo insn1 insn2
\insn1
\insn2
.endm

foo .section .sec1, .section .sec2

> Do you mean that if a macro's argument is the
string ".inst" then it will treat any text that follows on the same line
as being part of the same argument ?  If so, then is this special treatment
reserved only for macro arguments that start with ".inst" ?

What I meant was for gcc to treat the macro expansion in this example as foo
".section .sec1", ".section .sec2", albeit without the quotes, i.e. considering
.section .sec1 as the argument for insn1, and .section .sec2 as the argument
for insn2. Currently, as treats

foo .inst (XXX), .inst (YYY)

as 

foo ".inst (XXX)", ".inst (YYY)"

but not some others, such as foo .section .sec1, .section .sec2. All in all I
don't think this is a major issue and we have different ways to work around it,
so it's completely understandable if this remains what it is on gcc. I just
figured it may be worth reporting this issue to upstream in case there is any
interest to fix it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]