]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: macros nested too deep error
authorAlan Modra <amodra@gmail.com>
Mon, 16 Feb 2026 23:29:13 +0000 (09:59 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 17 Feb 2026 00:45:47 +0000 (11:15 +1030)
commitfc2fcd4f5be3f88a6ba44eab0ca541f55089bef5
tree03e990ea1eb43c27a6db1501ed495786aac0c9d3
parentdd2a080f6e1a144779a8a9dc9c107293d1fdad77
gas: macros nested too deep error

.macro r;r;.endm;r

Currently reports:
nest.s: Assembler messages:
nest.s:2: Fatal error: macros nested too deeply
nest.s:2:  Info: macro invoked from here
nest.s:2:   Info: macro invoked from here
...
nest.s:2:<much indenting> Info: macro invoked from here
nest.s:1:<much indenting>  Info: macro invoked from here

This patch corrects the line number reported, and downgrades the error
from as_fatal to as_bad.

* input-scrub.c (input_scrub_include_sb): Report "macros
nested too deeply" using as_bad.
* macro.c (buffer_and_nest): Only bump line number in .lineinfo
if we have a '\n'.
gas/input-scrub.c
gas/macro.c