[clang] [C23] Add *_NORM_MAX macros to <float.h> (PR #96643)
Joshua Cranmer via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 14:27:00 PDT 2024
================
@@ -113,7 +113,11 @@ static T PickFP(const llvm::fltSemantics *Sem, T IEEEHalfVal, T IEEESingleVal,
static void DefineFloatMacros(MacroBuilder &Builder, StringRef Prefix,
const llvm::fltSemantics *Sem, StringRef Ext) {
- const char *DenormMin, *Epsilon, *Max, *Min;
+ const char *DenormMin, *NormMax, *Epsilon, *Max, *Min;
+ NormMax = PickFP(Sem, "6.5504e+4", "3.40282347e+38",
+ "1.7976931348623157e+308", "1.18973149535723176502e+4932",
+ "1.79769313486231580793728971405301e+308",
----------------
jcranmer-intel wrote:
I don't think this is the correct value for ppc double-double, since double-double is supposed to give a different result for NORM_MAX than MAX (indeed, that's explicitly the point of the new macros!)
https://github.com/llvm/llvm-project/pull/96643
More information about the cfe-commits
mailing list