Re[2]: [cc65] preprocessor hazzle...

Date view Thread view Subject view

From: groepaz (groepaz_at_gmx.net)
Date: 2002-08-01 14:55:16


Hello Ullrich,

Thursday, August 01, 2002, 11:24:59 AM, you wrote:


UvB> Hi!

UvB> 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

UvB> I will need to have a look at this more closely, but the sign of the remainder
UvB> of the modulo operation is definitely specified as "implementation defined" in
UvB> the standard, so the way gcc does it is not the only allowed way to do it.

oh! well ;=) i stumbled about it when running some c99 testsuite on
cc65.... maybe the definition has been updated with c99 ?


-- 
Best regards,
 groepaz                            mailto:groepaz_at_gmx.net


----------------------------------------------------------------------
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 14:55:48 CEST