Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: 'pascal' keyword not accepted in typedefs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'pascal' keyword not accepted in typedefs



On 10/1/05 5:00 PM, Robert Slifka didst favor us with:

> Hi Larry,
>
>> Well, yes, all callbacks in Mac OS require this (read some headers). The
>> reasons are related to how parameters were passed on the stack in pascal vs.
>> C many moons ago. Nowadays I think the keyword is just there for
>> compatibility with code that uses the declaration. As I understand it, Xcode
>> just macros it away with something like this:
>>
>> #define pascal
>>
>> CW does not, though, so you'd have to add your own "pascal" killer or use it
>> for callbacks. What development environment are you using?
>
> I'm using Xcode, but this sample code was developed in CodeWarrior 2-3 years
> ago.  They didn't build it in Tiger because they would have found the GCC4
> bug with #pragma pack.
>
> If Xcode undefs pascal, why the compilation complaint when I use the pascal
> keyword on the typedef?  If Xcode supports the pascal keyword in front of
> function decls, why wouldn't it support it in front of
> function-pointer-typedefs?

Does James' suggestion address the problem?

Larry

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: 'pascal' keyword not accepted in typedefs (From: Robert Slifka <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.