[cc65] Re: -Cl error?

From: Johan Kotlinski <kotlinski1gmail.com>
Date: 2009-10-22 01:37:19
> void main() {
>    const char foo[3] = { 1, 2, 3 };
> }
>
> ...makes { 1, 2, 3 } static, but puts foo on the stack.

Oups, sorry. I see now that both foo and { 1, 2, 3 } are static. But
they don't reside in the same space, and { 1, 2, 3 } is copied to foo
in runtime.

A little surprising, as I expected -Cl to give the same result as
declaring every local variable static.

Johan
---
http://www.littlesounddj.com
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Oct 22 01:37:45 2009

This archive was generated by hypermail 2.1.8 : 2009-10-22 01:37:47 CEST