Quote:
|
Originally Posted by john atwood
...
The wacky behavior is a feature, where C18 intentionally departs from ISO standard behavior
for efficiency reasons. See section 2.7.1 of the C18 users guide.
To change the behavior, use the -Oi command line option, which can be set in MPLAB under Project->Build Options->Project->(tab)MPLAB C18->(check)Enable Integer Promotions.
John
|
Thanks!
Can you explain why not promoting to integer is more efficient? Or does that impact run time calculations even though the target may be a char? Can I override the promotion by explicitely typing intermediate values in an expression?
P.S. I figured out the Floating point problems: One has to tell MPLAB that the floating point representation is "MCHP" not ieee - then things display Ok. Unfortunately that only seems to work in the "watch" window properties. In the regular listings, hovering the cursor over the variable will return gibberish.