[cc65] Issue with an initializer using the address of an automatic variable

From: Oliver Schmidt <ol.sc1web.de>
Date: 2008-02-11 00:28:55

The Contiki codebase now contains a construct causing issues with cc65
:-( Here's the minimal program triggering the issue:

void main(void)
  int i;
  struct {
    int *p;
  } s = {&i};

GCC and MS VC++ consider this fine while cc65 (recent snapshot) states:

Error: Constant expression expected
Warning: Converting integer to pointer without a cast

Is this a cc65 bug?

Thanks in advance, Oliver
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Feb 11 00:29:11 2008

This archive was generated by hypermail 2.1.8 : 2008-02-11 00:29:14 CET