================ @@ -2835,6 +2835,9 @@ class Preprocessor { if (Identifier.getIdentifierInfo()->isRestrictExpansion() && !SourceMgr.isInMainFile(Identifier.getLocation())) emitRestrictExpansionWarning(Identifier); + + if (Identifier.getIdentifierInfo()->getName() == "INFINITY") ---------------- zahiraam wrote:
Since NAN is defined as (-(float)(INFINITY * 0.0F)) when used in the program it will trigger the "use of infinity via a macro results in undefined behavior due to the currently enabled floating-point options [-Wnan-and-infinity-disabled]". Wouldn't that be enough? If I add NaN here we would get 2 warnings. https://github.com/llvm/llvm-project/pull/76873 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits