This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/77992] Provide feature to initialize padding bytes to avoid information leaks


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

--- Comment #16 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Obviously any fields implicitly inserted like that must be ignored by the 
front ends when processing positional initializers - an initializer { 1, 
2, 3 } must initialize three explicitly declared fields and ignore any 
inserted padding fields between them (to be implicitly initialized with 
0).

Presumably you'd want such padding fields to be inserted for unused bits 
in the presence of bit-fields, and you'd want to make sure unnamed 
bit-fields, and bits unused as a result of an unnamed bit-field of width 
0, get properly initialized as well in the presence of such an option.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]