Re: [cc65] Another bug... ?

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-07-18 16:54:31


Hi!

On Thu, Jul 18, 2002 at 04:05:03PM +0200, groepaz wrote:
> look at this, problem is a case value of "0x8000" (min_int) used in a
> switch statement where the switch is done by a signed int.

Ok, I've checked the standard and it says that integer promotions on the
controlling variable should be applied. This would mean that the compiler does
indeed behave incorrectly - it should convert the variable i instead of
complaining. 

I have to admit that I'm not happy about this. The code is unclean, and doing
a type conversion on i for each label that does not have the same type
introduces quite some overhead under the hood. But then, the standard is the
standard is the standard...:-)

Thanks for the report, I will see what I can do about it.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
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-07-18 16:55:22 CEST