RE: [cc65] Type conversions

Date view Thread view Subject view

From: shubel, paul (shubel_paul_at_emc.com)
Date: 2002-12-20 16:47:12


Hi Uz,


>        int a = 10000, b = 10000;
>        int c = a * b;

>To make it work, you will have to cast one of the operands (or both) to
long,
>so that the expression is evaluated with long arithmetic.

I have always viewed this issue as a MAJOR portability issue of "C" code.
Namely, each compiler defaults to a standard size when evaluating
expressions.
For example, why couldn't the standard be that the compiler must evaluate
all
expressions with its maximum INT size?

Maybe I don't read enough, but I hardly ever see this problem discussed
anywhere
(except here of course).

Please.  What do you think?  Am I the only one who thinks that this is a 
under-publicized issue?


Thanks And Best Regards For The Holidays,


Paul
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-12-20 16:47:21 CET