Re: [cc65] preprocessor hazzle...

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-08-01 11:24:59


Hi!

On Wed, Jul 31, 2002 at 01:59:47AM +0200, groepaz wrote:
> that is, the runtime library appearently gets the result of the
> modulo-operation wrong - the sign of the remainder to be exact. i have
> checked with gcc (uhmz, to lazy to search for any proper definition, i
> believe in gcc for that matter ;=P) and it shows that
>
> sign(a % b) == sign (a)
>
> the current implementation applies the same rules to the
> modulo-operation as to the division/multiplication here, thus getting
> the wrong result in 3 of 4 cases ;=P

I will need to have a look at this more closely, but the sign of the remainder
of the modulo operation is definitely specified as "implementation defined" in
the standard, so the way gcc does it is not the only allowed way to do 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-08-01 11:25:02 CEST