On Mon, Feb 25, 2002 at 11:18:58AM +0100, "palm" wrote:
> I'm developping with codewarrior R6 using plain C
[...]
> When i call a function that is located in another file then the calling
> function the parameter passing doesn't work
> if one ore more of the parameters are 8bit wide.
[...]
> If I replace all 8bit types with a 16 bit type (e.g. UInt8 => UInt16, or
> forcing the compiler to make enums as 16bit) everything works quite fine.
Turn on "require function prototypes", or whatever the warning option is
called in CodeWarrior. Notice all the warnings you get.
Look up _default argument promotions_ in your C reference book to see
why the absence of a prototype makes a huge difference when you're
trying have a parameter that's smaller than an int.
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/