]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: gas: macros nested too deep error
authorAlan Modra <amodra@gmail.com>
Tue, 24 Feb 2026 21:22:15 +0000 (07:52 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 25 Feb 2026 03:57:39 +0000 (14:27 +1030)
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.

gas/input-scrub.c

index 2b90632040ba6041327daeb6bd26b58fe2417ac3..95252b26c6e3e21d76dbc18c46a4e4b48cd48326 100644 (file)
@@ -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;
     }