* lexsup.c (parse_args): Allow nested --start-group, --end-group.
+2009-11-30 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/11006
+ * lexsup.c (parse_args): Allow nested --start-group, --end-group.
+
2009-11-27 Tristan Gingold <gingold@adacore.com>
* pe-dll.c (pe_implied_import_dll): Return early if there is no
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:
}
}
- if (ingroup)
- lang_leave_group ();
+ while (ingroup)
+ {
+ lang_leave_group ();
+ ingroup--;
+ }
if (default_dirlist != NULL)
{