[binutils-gdb] Re: gas: macros nested too deep error
Alan Modra
amodra@sourceware.org
Wed Feb 25 03:58:01 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5d7e19ea9b22b9d0ec4f4d258b76bd2a786ac34e
commit 5d7e19ea9b22b9d0ec4f4d258b76bd2a786ac34e
Author: Alan Modra <amodra@gmail.com>
Date: Wed Feb 25 07:52:15 2026 +1030
Re: gas: macros nested too deep error
In commit fc2fcd4f5be3 I changed as as_fatal to as_bad, thinking that
was sufficient. Revert that change because
.macro r;r;r;.endm;r
with two recursive invocations in the body results in 2 to the power
max_macro_nest lines of gas output complaining about macro nesting.
* input-scrub.c (input_scrub_include_sb): Revert last change.
Diff:
---
gas/input-scrub.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 2b90632040b..95252b26c6e 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -298,10 +298,7 @@ input_scrub_include_sb (sb *from, char *position, enum expansion expansion)
if (expansion != expanding_app)
{
if (macro_nest > max_macro_nest)
- {
- as_bad (_("macros nested too deeply"));
- return;
- }
+ as_fatal (_("macros nested too deeply"));
++macro_nest;
}
More information about the Binutils-cvs
mailing list