[libcxx-commits] [libcxx] [libcxx] Undefine all supported C math functions (PR #94533)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 23 11:37:02 PDT 2024


ldionne wrote:

> 
> You're right that you need `#undef strxfrm`. You're not right that this means you need to define it yourself. The requirement of the C standard is that any standard library function may _also_ be defined as a macro. It's also valid to `#undef strxfrm` and then call `strxfrm`.

Ah ah! Thanks a lot for providing this insight, that was missing from my understanding. A lot of things make more sense now. In that case, I believe the right path forward would be to `#undef foo` before we introduce a function named `foo`, and to do that systematically. I don't think that should be too controversial given this new understanding.

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


More information about the libcxx-commits mailing list