Skip to content

Conversation

@ian-twilightcoder
Copy link

@ian-twilightcoder ian-twilightcoder commented Oct 23, 2025

In C23 mode, both float.h and math.h are required to define INIFINITY and NAN. However, with clang modules, there needs to be a single owner for the declarations. Let that be float.h since that's the compiler header, and introduce __need_infinity_nan so that math.h can pick up the compiler definitions.

rdar://163129990

…nitions of INIFINITY and NAN with float.h

In C23 mode, both float.h and math.h are required to define INIFINITY and NAN. However, with clang modules, there needs to be a single owner for the declarations. Let that be float.h since that's the compiler header, and introduce `__need_infinity_nan` so that math.h can pick up the compiler definitions.

rdar://163129990
@ian-twilightcoder
Copy link
Author

@swift-ci test llvm

@ian-twilightcoder
Copy link
Author

@swift-ci test

@ian-twilightcoder ian-twilightcoder merged commit eea4853 into swiftlang:stable/21.x Oct 24, 2025
5 checks passed
@ian-twilightcoder ian-twilightcoder deleted the infinity_nan branch October 24, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant