>The behavior may be "interesting", but it is standard. 

That's why I was very careful to say "interesting" :-).

>So, as Kenneth says, your solution may be considered ugly, but it
>*is* about the best solution when striving for compiler
>compatibility. Or you could work towards removing the assumption
>that enums are ints from your code, but that's probably a lot
>more problematic.

Is there any chance of adding an enums_are_ints/enumsalwaysint pragma in a future 
release of the dev tools?  As I mentioned in my original message, I'm stuck between a 
rock and a hard place here in that many of the enums are in headers that I don't 
control, and the external interface has to be callable from a variety of languages (C, 
Python, C#, Visual Basic, Delphi/Pascal, Java... OK, not all of those on PalmOS 
obviously) that either assume enums are ints or don't even have the concept of enums, 
so you just have a list of 32-bit constants in some cases.

The CodeWarrior approach of being able to specify that any enum past the #pragma is 32 
bits wide (so you can still get the system includes to work by pulling them in before 
the pragma) addresses this problem, it'd be a great help to have this feature 
available for people developing cross-platform code that's required (by other 
platforms) to assume that enums are 32 bits wide.
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to