do not skip validation of switch after %<opt
After the patch that revamped dump and aux outputs, GCC compilation
drivers built without Ada would reject -d* options. Such options
would only be validated because of the %{d*} in Ada lang specs, though
other languages had it as well. Other languages had %< specs that had
to be there before %{d*} %:dumps(), while Ada was missing them.
Adding them to Ada brought the same problem to compilers that had Ada
enabled.
The reason validation failed was that they mishandled %< specs,
advancing past the beginning of the next spec, causing it not to be
handled. Since %{d*} appeared after an odd %<, it was thus ignored.
The logic of validate_switches originally skipped the closing brace
that matched the opening brace, but this shouldn't happen for %<.
Fixed by letting validate_switches know whether it is handling a
braced group or a single atom, and behaving accordingly.
gcc/ChangeLog:
* gcc.c (validate_switches): Add braced parameter. Adjust all
callers. Expected and skip trailing brace only if braced.
Return after handling one atom otherwise.
(DUMPS_OPTIONS): New.
(cpp_debug_options): Define in terms of it.
gcc/ada/ChangeLog:
* gcc-interface/lang-specs.h (ADA_DUMPS_OPTIONS): Define in
terms of DUMPS_OPTIONS. Replace occurrences of %{d*} %:dumps
with it.