[cc65] Problem with using optimization and --static-locals together

From: Marc 'BlackJack' Rintsch <marc1rintsch.de>
Date: 2005-06-01 14:48:55
Hi *,

I have a source that compiles fine with any optimization flag (-O?) or 
(exor :-) with `--static-locals` but not with both flags (cc65 2.10.1).  
Example::

 bj@s8n> cc65 -t c64 -O --static-locals matrix.c
 bj@s8n> ca65 matrix.s
 matrix.s(362): Error: Constant expression expected

Line 361—363 of that assembler source::

         cmp     #$E8
 L0087:  jcs     _init_columns
         lda     #$00

The label `_init_columns` is a `.proc` in line 229::

 ; ---------------------------------------------------------------
 ; void __near__ init_columns (void)
 ; ---------------------------------------------------------------

 .segment       "CODE"

 .proc  _init_columns: near

All expressions look quite constant to me!?

Ciao,
	Marc 'BlackJack' Rintsch
-- 
                       /^\
                       \ /
 ASCII RIBBON CAMPAIGN  X  AGAINST HTML MAIL
                       / \

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Jun 1 21:25:06 2005

This archive was generated by hypermail 2.1.8 : 2005-06-01 21:25:10 CEST