https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82063
Bug ID: 82063 Summary: issues with arguments enabled by -Wall Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: wilson at gcc dot gnu.org Target Milestone: --- Noticed this while looking at the -Wall documentation. -Walloc-alloc-size-larger-than= is listed in the c-family/c.opt file as being enabled by -Wall, however, nothing is provided for the enable/disable values, as is done for every other -Wall enabled options that takes an argument. The code tries to enable it using the default value of 1 and a NULL string, but since the option takes a string argument, the 1 value is ignored, and the NULL string is used, so it gets set to zero, which disables it. I stepped through cc1 code in the debugger to verify this. If we really do want this enabled by -Wall, then we probably need an extension to LangEnabledBy to specify on/off strings for arguments that take strings. Both -Warray-bounds and -Warray-bounds= are listed in the c.opt file as being enabled by -Wall, but they are the same option, and it causes this one option to be processed twice in the C_handle_option_auto function in the generated options.c file. It gets set to the same value twice, so it does work as intended, but this is wasteful.