[cfe-commits] r52914 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/AST/Builtins.def include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/CodeGen/CGBuiltin.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CodeGenTypes.cpp lib/Co
Eli Friedman
eli.friedman at gmail.com
Mon Jun 30 21:50:52 PDT 2008
On Mon, Jun 30, 2008 at 6:40 PM, Chris Lattner <clattner at apple.com> wrote:
>> Okay, makes sense... it's a rather different approach from the
>> original patch, but it's probably better this way. Although, why do
>> we need to be able to sometimes expand the libm calls? Are we trying
>> to match gcc guarantees about folding, or something like that?
>
> GCC allows you to do this:
>
> const char *foo(const char *X) { return __builtin_nan(X); }
>
> which should call the libm 'nan' function.
Oops, I phrased that backwards; the question is why do we ever need to
fold it in clang?
-Eli
More information about the cfe-commits
mailing list