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

From: Oliver Schmidt <ol.sc1web.de>
Date: 2008-02-11 10:39:16
Hi,

> On Mon, Feb 11, 2008 at 09:48:12AM +0100, Spiro Trikaliotis wrote:
> > But: i is NOT part of s, it is declared outside:

@Spiro: Thanks for pointing out :-)

> Yes, sorry. I got the code completely wrong. Maybe it was to early for me in
> the morning:-)

@Uz: I'm perfectly willing to deal with that given your amazing response time !

> A pointer to a local variable is not considered constant, because code must be
> generated to calculate it. Since local structs get initialized by the compiler
> generating a template in read only data, it is necessary that data placed
> there can be evaluated at compile time.

That's kind of what I imagined...

> I'm not sure how much work it is to
> change that.

I see. So the code in question _IS_ correct (?).

Thanks in advance for looking into it, Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Feb 11 10:39:25 2008

This archive was generated by hypermail 2.1.8 : 2008-02-11 10:39:28 CET