jfb added a comment.

In D74361#1879559 <https://reviews.llvm.org/D74361#1879559>, @rjmccall wrote:

> I'm not sure if it's a good idea to be re-using the existing attribute like 
> this.  It's not that unreasonable, I guess, but I'd like to hear JF's 
> thoughts.


The current uninitialized attribute fits the model C and C++ follow for 
attributes: they have no semantic meaning for a valid program, in that a 
compiler can just ignore them and (barring undefined behavior) there's no 
observable effect to the program. This updated semantic changes the behavior of 
a valid C and C++ program, because the standards specify the value of 
uninitialized globals and TLS. I'd much rather have a separate attribute, say 
`no_zero_init`, to explicitly say what this does.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74361



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to