I am using CodeWarrior 10.7 to write an application for an S12Z processor. I have enabled C99 and GCC extensions. However, if I declare a variable of unsigned long long (i.e. uint64_t) and try to assign a value of greater than 0xFFFFFFFFF to it I get a "number is out of range " error when I build the code. Is there some other build setting that I have overlooked?
Hi
When create a new S12Z project, we can select either of these two options, which will enable ansidr.lib or ansidm.lib linking to the project, setting llong_size=8
See my attached testing video.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I've just found the compiler manual http://www.nxp.com/assets/documents/data/en/reference-manuals/CWMCUS12ZCMPREF.pdf , and it would appear that 64 bit integers are not supported. Unsigned long is 32 bits, unsigned long long is also 32 bits. However, they are if you set up the project to use the floating point libraries!