Opened 3 years ago

#252 new defect

Designator problem with arrays

Reported by: pabuhr Owned by:
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:
Cc:

Description

struct A {
	int w, z; // must have 2 fields
};
void fred() {
	A a0, a2[4] = { [2] : a0, [0] : a0 }; // must have 2 variable initializers
}

This error should not occur.

cfa test.cfa
CFA Version 1.0.0 (debug)
test.cfa:5:1 error: Invalid application of existing declaration(s) in expression Untyped Init Expression
  Name: a0  InitAlternative: signed int... designated by: 
    Constant Expression (0: unsigned long int)
    ... with resolved type:
      unsigned long int
    Variable Expression: z: signed int
    ... with resolved type:
      signed int

Change History (0)

Note: See TracTickets for help on using tickets.