https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71063
ktkachov at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|ktkachov at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #4 from ktkachov at gcc dot gnu.org --- (In reply to Marek Polacek from comment #3) > FWIW, my fix was > > --- a/gcc/opts.c > +++ b/gcc/opts.c > @@ -1641,6 +1641,11 @@ common_handle_option (struct gcc_options *opts, > { > ++ a; > pflags = & exclude_flags; > + if (*a == '\0') > + { > + error_at (loc, "missing argument to %qs", "--help=^"); > + break; > + } > } > else > pflags = & include_flags; Ah, this looks a bit cleaner and shorter than what I had in mind. Would you mind testing/submitting yours instead?