[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

Michael Jones via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 29 10:15:01 PDT 2024


michaelrj-google wrote:

Re: there being observable differences between a header in C vs C++ mode, that's already a thing.

The definition for `isinf` in math.h is specified to be a macro in C, but specified to be a function in C++. We're already doing `#ifdef __cplusplus` for that (see https://github.com/llvm/llvm-project/blob/main/libc/include/llvm-libc-macros/math-macros.h), and other libc's do similar (see `iszero` in glibc).

https://github.com/llvm/llvm-project/pull/86748


More information about the cfe-commits mailing list