[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 6 08:35:47 PST 2023
AaronBallman wrote:
> Should this only apply in C23 mode? Standard behavior until C23 is that `_Float16` promotes to `double`. What about C++?
`_Float16` wasn't standardized until C23; before then it was part of TS 18661, but we never claimed conformance to that (that I'm aware of), so I think we have the wiggle room to be consistent across language modes. My bigger question is: do we codegen properly and what do C standard libraries expect? e.g., if we codegen such that we don't promote in older language modes, will this cause problems for runtime libraries?
CC @jcranmer-intel for additional opinions
https://github.com/llvm/llvm-project/pull/74439
More information about the cfe-commits
mailing list