Re: [cc65] Overflows in signed comparisions

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2003-10-06 01:54:39


On Saturday 04 October 2003 17:53, Piotr Fusik wrote:
> Some time ago I submitted this bug report:
>
> #include <stdio.h>
> void main() {
> 	int a = -0x5000;
> 	puts(a < 0x5000 ? "ok" : "error");
> 	getchar();
> }
>
> As I see, it still displays "error", even with optimizations disabled.
> I think that at least the docs should explain that.

its not an overflow i think, rather a real serious bug :=P i added some of 
sdcc's regression tests to the testsuite last nite (and i hope i'll manage to 
get the rest added this nite) and all the tests which involve signed 
comparisons do fail :=P

gpz

oh...and i discovered another "bug" in the "documentation" .... on cc65 
mainpage it says

"C functions may not return structs. Struct assignment is possible."

i think to be more precise, and to avoid confusion it should say something 
like

"C functions can not take structs as parameters by value. Structs can not be
returned by value. Struct assignment is possible."

...oh, and the vic-20 is missing in the list of supported targets :O)

----------------------------------------------------------------------
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 : 2003-10-06 02:00:10 CEST