spin2cpp icon indicating copy to clipboard operation
spin2cpp copied to clipboard

Nested designators not supported for C initialization

Open totalspectrum opened this issue 2 years ago • 0 comments

This particularly affects anonymous structs, e.g.

union {
  struct { float x, y; };
  float raw[2];
} point = { .x = 1.0, .y = 2.0 }

fails, as does an attempt ot initialize with {.raw[0] = 1.0, .raw[1] = 2.0 }.

totalspectrum avatar Jan 10 '23 17:01 totalspectrum