• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


On May 12, 2016, at 1:12 AM, 军其 胡 <email@hidden> wrote:

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

  • Prev by Date: Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
  • Next by Date: Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
  • Previous by thread: Re: Problems about the keybinding in Xcode and the standard namespace of Apple Clang
  • Next by thread: debug play button disappears? bug or "feature" ??
  • Index(es):
    • Date
    • Thread