On Thu, Mar 13, 2025 at 03:44:21PM +0100, Richard Biener wrote: > + case OPT_D: > + case OPT_U: > + if (strncmp (options[i].arg, "_FORTIFY_SOURCE", > + strlen ("_FORTIFY_SOURCE")) == 0)
I'd say you want to verify that after that substring there is either '\0' or "=". Otherwise you'll record -D_FORTIFY_SOURCE_NOT_REALLY=1 which doesn't matter at all. > + { > + switches.safe_push (options[i].orig_option_with_args_text); > + len += strlen (options[i].orig_option_with_args_text) + 1; > + } > + /* Otherwise ignore these. */ > + continue; > case OPT_flto_: > { > const char *lto_canonical = "-flto"; Otherwise LGTM. Jakub