[cc65] struct + const confusion?

From: Johan Kotlinski <kotlinski1gmail.com>
Date: 2009-10-07 22:58:20
Hi, I got a problem with cc65 now.

typedef struct {
    char foo;
} Bar;

void main() {
    Bar bar;
    Bar* const baz = &bar;
    baz->foo = 1;
}

This produces the compiler error "test.c(9): Error: Assignment to const"

Shouldn't be an error, should it? baz is const, bar isn't.

Regards,
Johan
----------------------------------------------------------------------
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 Oct 7 22:58:47 2009

This archive was generated by hypermail 2.1.8 : 2009-10-07 22:58:50 CEST