* Jakub Jelinek: > On Mon, Nov 06, 2023 at 03:19:32PM +0100, Florian Weimer wrote: >> * Jakub Jelinek: >> >> > On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: >> >> Future changes will treat some C front end warnings similar to >> >> -Wnarrowing. >> >> >> >> gcc/ >> >> >> >> * doc/invoke.texi (Warning Options): Mention C diagnostics >> >> for -fpermissive. >> >> >> >> gcc/c-family/ >> >> >> >> * c.opt (fpermissive): Enable for C and ObjC. >> >> * c-opts.cc (set_std_c89): Enable -fpermissive. >> > >> > Won't this set flag_permissive even for -std=c89 -std=c99 ? >> > Haven't tried, but if set_std_c* is called multiple times if more than >> > one -std= option appears, then perhaps this should be done later after >> > processing all options, not during that processing. >> >> Ugh, you are right. >> >> What would be the right place to do this kind of final option >> processing? Where those SET_OPTION_IF_UNSET are? > > c_common_post_options ? > Generally, we have global_options, which are the values of the options > (implicit or explicit) and then another variable of the same type, > global_options_set, which uses all values just as booleans whether the > option was set explicitly or not.
Yes, c_common_post_options seems to work. Thanks for the hint regarding global_options_set. I can use it to make -std=gnu89 -fno-permissive do something useful. I'm going to send an update patch. Florian