"Keith Rollin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What SDK are you using?  The closest I could find in the current SDK to
what you cite is the following:
> typedef enum WinDirectionTag
> {
> winUp = 0,
> winDown,
> winLeft,
> winRight
> } WinDirectionType;
>
> Before Palm OS 3.5, the above appeared as follows:
> enum directions { up = 0, down, left, right };
> typedef enum directions DirectionType;

Both of those are not ANSI pedantic.  The reason is the unspecified  members
allow the compiler to determine the data type to be used for the enumerated
type.  True, the vast majority will use "int" but even some that default to
this have an option to override it.  To be pedantic, we would typecast the
initializer "= (int)0" forcing enums to be of type int.  Both/either of the
above enums kill a pedantic compile.  The SDK is riddled with them.  The
thing is even if Palm wanted to "fix" this, I'm not sure how they would
because surely gcc would not dereference "Int16" all the way back to "int",
right?

> P.S. With regards to using "-pedantic", note that the gcc man page says
> "There is no reason to use this option; it exists only to satisfy
pedants." :-)

All programmers (at least C programmers) are pedants at heart; don't try to
deny it!



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to