07-30-2012, 09:10 AM
I dunno, to be honest, I have never thought about this kind of issues
gcc compiles the sources without a warning, as z88dk does. Even Hisoft BASIC works in 16 bits for integer calculations. Anyways, %d stands for any numeric variable, doesn't it? (I really don't know)
I understand your concerns about memory / speed. But shouldn't the user be the one who's in charge of performing such optimizations?
Right away, you can fix the issue by explicit type-casting. What would be the possibility/feasibility of those options:
1.- A command line option / compiler directive to enable / disable type promotion.
2.- Type promotion by default but the user can typecast to reduce memory usage and increase speed (just the opposite of current behaviour)
Not that I can't live with the compiler as it is right now, of course. I have no problems if I have to typecast stuff myself.

I understand your concerns about memory / speed. But shouldn't the user be the one who's in charge of performing such optimizations?
Right away, you can fix the issue by explicit type-casting. What would be the possibility/feasibility of those options:
1.- A command line option / compiler directive to enable / disable type promotion.
2.- Type promotion by default but the user can typecast to reduce memory usage and increase speed (just the opposite of current behaviour)
Not that I can't live with the compiler as it is right now, of course. I have no problems if I have to typecast stuff myself.