• 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
GCC 4.0 GetKeys() and BigEndianLong for Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC 4.0 GetKeys() and BigEndianLong for Intel


  • Subject: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • From: Ken Baer <email@hidden>
  • Date: Wed, 15 Jun 2005 10:29:06 -0700

I've got some code that calls GetKeys( KeyMap theKeys ) to get the modifier keys state.  Then I use a mask to test which of them are down.  I get a compile error:

error: no match for 'operator&' in 'theKeys[1] & 2l'

First, I know that I need to find constants for the key masks, what are those masks?
But now that KeyMap is an array of BigEndianLong rather than UInt32, the compiler can't find an operator & that works with it.  What is the best way to deal with this in our new Universal Binaries world?

Also, I have a SHORT that I want to set the most significant bit on.  Currently the code is 

result |= 0x8000;

What's the rule of thumb to make it cross chip happy?

Thanks.

 _______________________________________________
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

  • Follow-Ups:
    • Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
      • From: Eric Albert <email@hidden>
  • Prev by Date: Re: Shark complains: No sampling configurations found
  • Next by Date: Re: How to choose the compiler in a new project
  • Previous by thread: Re: How to choose the compiler in a new project
  • Next by thread: Re: GCC 4.0 GetKeys() and BigEndianLong for Intel
  • Index(es):
    • Date
    • Thread