https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89051

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|marxin at gcc dot gnu.org          |unassigned at gcc dot 
gnu.org

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
I spent quite some time with that and it's much complicated. Basic problem I
face is that there are 2 situations:

1) -Wno-error=pedantic - in that situation -Wpedantic should not be set
(because it's not enabled before)
2) -Werror -Wno-error=implicit - here -Wimplicit should be set + all
sub-options

So it definitely needs to go through handle_generate_option:

#0  set_option (opts=0x271a920 <global_options>, opts_set=0x0, opt_index=179,
value=1, arg=0x0, kind=4, loc=0, dc=0x271e080 <global_diagnostic_context>) at
/home/marxin/Programming/gcc/gcc/opts-common.c:1373
#1  0x0000000001af202b in handle_option (opts=0x271a920 <global_options>,
opts_set=0x271b8a0 <global_options_set>, decoded=0x7fffffffd220,
lang_mask=3120, kind=4, loc=0, handlers=0x7fffffffd8b0, generated_p=true,
dc=0x271e080 <global_diagnostic_context>)
    at /home/marxin/Programming/gcc/gcc/opts-common.c:1098
#2  0x0000000001af2165 in handle_generated_option (opts=0x271a920
<global_options>, opts_set=0x271b8a0 <global_options_set>, opt_index=179,
arg=0x0, value=1, lang_mask=3120, kind=4, loc=0, handlers=0x7fffffffd8b0,
generated_p=true, 
    dc=0x271e080 <global_diagnostic_context>) at
/home/marxin/Programming/gcc/gcc/opts-common.c:1130
#3  0x0000000001af4d06 in C_handle_option_auto (opts=0x271a920
<global_options>, opts_set=0x271b8a0 <global_options_set>, scode=163, arg=0x0,
value=1, lang_mask=3120, kind=4, loc=0, handlers=0x7fffffffd8b0, dc=0x271e080
<global_diagnostic_context>) at options.c:16717
#4  0x00000000008ab013 in c_common_handle_option (scode=163, arg=0x0, value=1,
kind=4, loc=0, handlers=0x7fffffffd8b0) at
/home/marxin/Programming/gcc/gcc/c-family/c-opts.c:710
#5  0x0000000000cb282a in lang_handle_option (opts=0x271a920 <global_options>,
opts_set=0x271b8a0 <global_options_set>, decoded=0x7fffffffd4b0, lang_mask=16,
kind=4, loc=0, handlers=0x7fffffffd8b0, dc=0x271e080
<global_diagnostic_context>)
    at /home/marxin/Programming/gcc/gcc/opts-global.c:180

which implements EnabledBy dependencies. I'm retreating for now :/

Reply via email to