Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codemanyak opened this issue Sep 27, 2023 · 0 comments
Assignees
Milestone

Comments

@codemanyak
Copy link
Collaborator

codemanyak commented Sep 27, 2023

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};
@codemanyak codemanyak added this to the Release 3.33 milestone Sep 27, 2023
@codemanyak codemanyak self-assigned this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant