philnik777 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).
That's actually really bad. Both libc++ and libstdc++ assume that these are either not provided at all by the libc or are macros. This will inevitably lead to ambiguous overloads. https://github.com/llvm/llvm-project/pull/86748 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits