Re: [cc65] declaring variables after code

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-04-23 19:57:59
On Fri, Apr 23, 2010 at 09:25:25AM +0200, Spiro Trikaliotis wrote:
> What is possible, however, is to use
>    for (...)
>    {
>       int somedummy;
>       ...
>    }

Beware: There's a secret hidden bug in all cc65 versions since - I don't know,
but probably for at least 10 years: If you jump out of a local scope that
declares variables using goto, the stackpointer is not adjusted and the
program will crash. Using break or continue is ok, but I would avoid these
constructs with cc65 anyway.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Apr 23 19:58:04 2010

This archive was generated by hypermail 2.1.8 : 2010-04-23 19:58:06 CEST