Opened 7 years ago
Closed 7 years ago
#39 closed defect (fixed)
Global const array initialization broke with references
Reported by: | Rob Schluntz | Owned by: | Rob Schluntz |
---|---|---|---|
Priority: | critical | Component: | cfa-cc |
Version: | 1.0 | Keywords: | global const array initialization references |
Cc: |
Description
const int fred[1] = { -2 }; // fails for const and negative value test.c:8 error: No reasonable alternatives for expression Cast of: Applying untyped: Name: ?[?] ...to: Variable Expression: fred: array of const signed int with dimension of Cast of: constant expression (1 1: one_t) to: long unsigned int with environment: Types: Non-types: Variable Expression: _index0: signed int to: reference to signed int error: No reasonable alternatives for expression Cast of: Applying untyped: Name: ?[?] ...to: Variable Expression: fred: array of const signed int with dimension of Cast of: constant expression (1 1: one_t) to: long unsigned int with environment: Types: Non-types: Variable Expression: _index0: signed int to: reference to signed int
Note: See
TracTickets for help on using
tickets.
In 0c6596f: