eisenwave wrote:

Well, I'm not sure if it's a good sign or a bad sign, but this warning gives us 
a *whole bunch* of diagnostics in libc:
```
  
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/CPP/bit.h:55:10:
 error: '__builtin_bit_cast' from 'const long double' to 'unsigned __int128' is 
always undefined because it unconditionally maps a padding bit onto a 
non-padding bit [-Werror,-Wbit-cast-padding]
     55 |   return __builtin_bit_cast(To, from);
        |          ^
  
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/FPBits.h:842:21:
 note: in instantiation of function template specialization 
'__llvm_libc_23_0_0_git::cpp::bit_cast<unsigned __int128, long double>' 
requested here
    842 |     UP::bits = cpp::bit_cast<StorageType>(x);
        |                     ^
  
/home/gha/actions-runner/_work/llvm-project/llvm-project/libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h:46:10:
 note: in instantiation of function template specialization 
'__llvm_libc_23_0_0_git::fputil::FPBits<long double>::FPBits<long double, 0>' 
requested here
     46 |   LDBits bits(x);
        |          ^
```

I guess this means
- There is a good chance that this warning will be very noisy for code bases 
that make heavy use of `std::bit_cast` to convert `long double`
- Maybe that's a good thing because all of that is latent undefined behavior 
anyway

https://github.com/llvm/llvm-project/pull/200362
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to