aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-11-30 00:27:45 +0000
committerAlan Modra <amodra@gmail.com>2009-11-30 00:27:45 +0000
commit20f3d0d667e035dcb12a142a86fd4b68360fd328 (patch)
treedf1b8f55e37d2ca1588faef6bdfe3cc1d7f8bdfa /ld/lexsup.c
parentd8b31cf05504f6170417c470efd102d3d2d73e8e (diff)
downloadgdb-20f3d0d667e035dcb12a142a86fd4b68360fd328.zip
gdb-20f3d0d667e035dcb12a142a86fd4b68360fd328.tar.gz
gdb-20f3d0d667e035dcb12a142a86fd4b68360fd328.tar.bz2
PR ld/11006
* lexsup.c (parse_args): Allow nested --start-group, --end-group.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 20aef7b..b992fca 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -1459,18 +1459,15 @@ parse_args (unsigned argc, char **argv)
command_line.accept_unknown_input_arch = FALSE;
break;
case '(':
- if (ingroup)
- einfo (_("%P%F: may not nest groups (--help for usage)\n"));
-
lang_enter_group ();
- ingroup = 1;
+ ingroup++;
break;
case ')':
if (! ingroup)
einfo (_("%P%F: group ended before it began (--help for usage)\n"));
lang_leave_group ();
- ingroup = 0;
+ ingroup--;
break;
case OPTION_INIT:
@@ -1501,8 +1498,11 @@ parse_args (unsigned argc, char **argv)
}
}
- if (ingroup)
- lang_leave_group ();
+ while (ingroup)
+ {
+ lang_leave_group ();
+ ingroup--;
+ }
if (default_dirlist != NULL)
{