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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 59857
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59857&action=edit
gcc15-pr118011.patch

There are multiple issues.  One is that this option (but there are tons of
other options which do it similarly) uses the old style of checking if the
option has been explicitly set by making up some special value, instead of
checking
global_options_set.  This patch changes that.
And the other is that --help printing is done before various options are
finalized, e.g. toplev.cc (process_options) isn't done in that case.
Now, that function can emit various warnings etc., so might not be appropriate
as is, I guess for --help we want to silently print something that matches what
will be enabled rather than emit the warnings too.
Anyway, this patch doesn't change that, so I think it will now print [disabled]
both on targets which default to -fno-short-enums and on targets which default
to -fshort-enums.
E.g. -fsection-anchors, -fira-region, -fasynchronous-unwind-tables,
-funwind-tables, -fprofile-values, -fleading-underscore, -gas-loc-support,
-gas-locview-support, -gvariable-location-views, -ftree-cselim,
-ffunction-sections, -fdata-sections, -fprefetch-loop-arrays, -ftrapping-math,
-fassociative-math, -fhardened, -fstack-clash-protection, -fstack-check,
-Wstack-protect, -fsanitize=, -fipa-ra, etc. can change their state there.

Reply via email to