efriedma-quic wrote: > and that implies (at least to me) that an expression cannot form an infinity > to begin with, so the act of trying to expand INFINITY is nonsensical in that > case, right?
It's undefined behavior at runtime. I don't think we need to worry too much about what the C standard says here; the language around floating-point types that don't have infinity was written in the old days before everyone settled on using IEEE math. And I think the warning we currently produce is probably more helpful in practice than "INFINITY not defined". ---- What I was getting at with the standard version thing is that in standard versions before C23, I don't think NAN is a reserved identifier if you don't include math.h. So it's forbidden for float.h to define it. https://github.com/llvm/llvm-project/pull/96659 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits