Re: [cc65] broken string arithmetic

From: MagerValp <MagerValp1cling.gu.se>
Date: 2004-07-13 17:24:10
Something's going on here:

> void main(void) {
>   int column;
> 
>   column = 10;
>   puts("xxxxxxxxxxxxxxxxxxxx" + column);
>   column = 15;
>   puts("xxxxxxxxxxxxxxxxxxxx" + column);
> }

[Spike:~/prog/cvote] pelle% cl65 -T -Oirs -t c64 test.c
Unresolved external `L0000' referenced in:
  test.s(44)
ld65: Error: 1 unresolved external(s) found - cannot create output file

This works fine though:

> void main(void) {
>   int column;
>   unsigned char *str = "xxxxxxxxxxxxxxxxxxxx";
> 
>   column = 10;
>   puts(str + column);
>   column = 15;
>   puts(str + column);
> }

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .  Per Olofsson, arkadspelare
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jul 13 17:24:15 2004

This archive was generated by hypermail 2.1.8 : 2004-07-13 17:24:23 CEST