Skip to content

Consider -Wzero-init-padding-bits for C and C++ Compiler HardeningΒ #938

@thomasnyman

Description

@thomasnyman

Via @thesamesam in comment to #919

GCC 16 is expected to add a warning diagnostic, -Wzero-init-padding-bits=, which is intended to help programmers to find code that might now need to be rewritten or recompiled with-fzero-init-padding-bits=unions or -fzero-init-padding-bits=all in order to replicate the behaviour that it had when compiled by older versions of GCC (see #857 and #933). It can also be used to find struct padding that was never previously guaranteed to be zero initialized and still isn't unless GCC is invoked with -fzero-init-padding-bits=all option.

Resources:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions