Re: deprecated FOUR_CHAR_CODE and macintel
Re: deprecated FOUR_CHAR_CODE and macintel
- Subject: Re: deprecated FOUR_CHAR_CODE and macintel
- From: "Andy O'Meara" <email@hidden>
- Date: Thu, 12 Jan 2006 18:46:54 -0500
- Thread-topic: deprecated FOUR_CHAR_CODE and macintel
>> This is somewhat off-topic, but also somewhat related: We've made
>> liberal use of such four-character constants in our code, which
>> assumes that 'ABCD' is represented in big-endian order on a Mac and
>> little-endian order on a Windows PC. This assumption has worked
>> fine for CodeWarrior and Xcode, but we've begun transitioning to
>> Visual C++ for our Windows builds, and that compiler represents
>> such constants in big-endian order.
>
> Are you sure that's right? I hate to doubt you here, but this is the
> first I've heard of this. Presumably anyone working with QuickTime
> for Windows would've hit this a long time ago, but I haven't heard
> the QuickTime team or any developers using QT on Windows mention it.
> Maybe I'm just not talking to the right developers....
>
Yeah, every compiler I've ever seen, even back into the Win16 days,
multi-char literals are just a convenience representation for for hex
literals (left to right denotes most sig to least sig). Lawrence, perhaps
you're just misspeaking? ( 'APPL' >> 24 ) will get you 'A' no matter if
you're on MSVC, CW, gcc, or you name it. The only exception I've ever heard
of is that Borland used to have a compiler option where char literals are
understood to read from least to most sig.
Also, as I understand it, 2 or 3 char literals aren't part of the C spec, so
that's why gcc is set to give warnings unless you change stuff like 'AB' to
'\0\0AB'. Most annoying and useless warnings ever.
Andy
_______________________________________________
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