================
@@ -0,0 +1 @@
+constexpr float g8 = __builtin_nanf(u8"");
----------------
AaronBallman wrote:

I think it's a bug that we don't reject this in C++ mode; `char8_t *` is a 
distinct type there which should not convert to `char *`. CC @cor3ntin 
@tahonermann for more opinions though.

I would prefer if we also diagnosed in C as well as C++. GCC accepts in C and 
that behavior is somewhat defensible given that `char8_t` is an alias to 
`unsigned char`, but I'd still like the diagnostic for the same reason Clang 
diagnoses this conversion in other cases: https://godbolt.org/z/z3d9ef7EE

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

Reply via email to