[PATCH] D68115: Zero initialize padding in unions

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 13:43:21 PDT 2020


hubert.reinterpretcast added a comment.

In D68115#1946757 <https://reviews.llvm.org/D68115#1946757>, @rsmith wrote:

> 3. After doing (1), extend `__builtin_bit_cast` support to properly handle padding bits.
> 4. After doing (1) and (2), extend constant aggregate emission to always zero padding when required by the language standard. (If you want, make the flag be three-way: never zero, zero as required by language standard, always zero, maybe: `-fzero-padding=never` / `-fzero-padding=std`, `-fzero-padding=always`.)


Just to make sure I understand correctly. There is no proposal to consider non-standard zeroing behaviour in constant expression evaluation; right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68115/new/

https://reviews.llvm.org/D68115





More information about the cfe-commits mailing list