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

            Bug ID: 118575
           Summary: -ftrivial-auto-var-init=zero should perhaps imply
                    -fzero-init-padding-bits=all
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, kees at outflux dot net,
                    qing.zhao at oracle dot com
  Target Milestone: ---

-ftrivial-auto-var-init=zero is intended for kernel-like usecases where they
want to minimise the risk of uninitialised memory contents being leaked.

Given the point of the option, it may make sense to have
-ftrivial-auto-var-init=zero imply -fzero-init-padding-bits=all (unless
overridden by the user), which I think is better aligned to what people will
expect?

I really doubt anyone using -ftrivial-auto-var-init=zero is worried about
optimising the amount of initialisation work even if DSE may clean up a lot of
it.

Reply via email to