Re: [cc65] Bugs?

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-03-06 07:52:52


Hi!

On Tue, Mar 05, 2002 at 02:36:48PM +0100, Piotr Fusik wrote:
> In stdlib.h there's:
> int __fastcall__ atoi (char* s);
> long __fastcall__ atol (char* s);
>
> Shouldn't there be const char* ?

Yes, that's correct. These are issues that come from the time when the
compiler didn't support any qualifiers. That is, it had support for
qualifiers, but "support" at that time did only mean that the compiler skipped
the relevant keywords when it found them. Having real support for qualifiers
in types is rather new.

> void test() {
> 	const char *p;
> 	char q[1];
> 	p - q;	// Error: Incompatible pointer types
> }
[...]
> struct s a;
> const struct s *p;
> a = *p;		// Error: Incompatible types

These two have a similar reason than the missing const in the header file:
Qualifier support is rather new, and the compiler is too strict when comparing
types in the above cases. I've fixed the problems, see the bugs page for a
patch.

I will have a look at the other two cases as soon as I find some time
(hopefully this morning). Thanks a lot for the report!

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-03-06 07:53:05 CET