[libc-commits] [libc] [libc] avoid type-punning with inactive union	member (PR #116685)
    Schrodinger ZHU Yifan via libc-commits 
    libc-commits at lists.llvm.org
       
    Mon Nov 18 11:37:42 PST 2024
    
    
  
SchrodingerZhu wrote:
@nickdesaulniers it is a defined behavior in C by standard and in C++ in most compilers, even after strict aliasing: https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Optimize-Options.html#index-fstrict-aliasing. 
And I think some of the examples I changed might have fallen into the category of "union copied byte-by-byte", but I think it is fine to remove them all.
https://github.com/llvm/llvm-project/pull/116685
    
    
More information about the libc-commits
mailing list