Re: [cc65] Issue with an initializer using the address of an automatic variable

From: Ullrich von Bassewitz <>
Date: 2008-02-11 08:52:47
Good morning!

On Mon, Feb 11, 2008 at 12:28:55AM +0100, Oliver Schmidt wrote:
> GCC and MS VC++ consider this fine while cc65 (recent snapshot) states:
> Error: Constant expression expected
> Warning: Converting integer to pointer without a cast
> Is this a cc65 bug?

Actually two of them:-) For one, cc65 will not search in struct scope to
resolve names. This is easily circumvented by writing &s.i. Second, cc65 will
not insert local symbols into the symbol table before initializing them, so
while this works on a global level, it won't work on function level. The later
should be fixable, I will have a look at it.

Thanks for the report!



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Feb 11 08:52:58 2008

This archive was generated by hypermail 2.1.8 : 2008-02-11 08:53:02 CET