Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug or Feature?
#9
I dunno, to be honest, I have never thought about this kind of issues Smile 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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)