[PATCH v2] c-family: Enable -fpermissive for C and ObjC
Jakub Jelinek
jakub@redhat.com
Mon Nov 6 14:31:37 GMT 2023
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.
Jakub
More information about the Gcc-patches
mailing list