Skip to content

On exporting record initializers to C or C++, an equivalent C 99 notation might be used. #1090

@codemanyak

Description

@codemanyak

By now (i.e. upto version 3.32-11 at least) a record initializer expression like the one in the cyan element of diagram DateTests563 in the below arrangement would be exported to C as an ordered value initializer expression:
Record_initializer_3 28-06
This means, the resulting program line in the C code would be:

struct Date someDay = {2017, 2, 24};

The resulting code is quite correct, of course. But instead a closer C syntax could be used for the export:

struct Date someDay = {.day = 24, .month = 2, .year = 2017};

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions