Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
- Subject: Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
- From: Jens Alfke <email@hidden>
- Date: Thu, 12 May 2016 11:59:15 -0700
The Xcode (or Apple Clang) gives the results with both 3.000000. I have tried to compile the same code by GCC on Fedora 22 and obtain the opposite results with both -3.000000. It's ridiculous since abs and std::abs are lying in different namespaces.
I believe fabs is one of those magic standard-library functions that the compiler is allowed to replace with inline assembly, since that’s more efficient than a function call. In that case it would just ignore your definition. (This is probably defined somewhere in the C spec, but I’m not about to dive in and look for it.)
(For example, I know this happens with memcpy — when invoked with a small constant size, both GCC and Clang will frequently generate a series of load/store instructions rather than call the actual memcpy function.)
These seem like very artificial examples; is there something realistic you’re trying to do that’s giving you trouble with Clang?
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden