Skip to content

fix: added support for the internal void type in generated headers#1646

Merged
Angus-Bethke-Bachmann merged 3 commits intomasterfrom
anbt/PRG-3962
Mar 31, 2026
Merged

fix: added support for the internal void type in generated headers#1646
Angus-Bethke-Bachmann merged 3 commits intomasterfrom
anbt/PRG-3962

Conversation

@Angus-Bethke-Bachmann
Copy link
Copy Markdown
Contributor

Added

  • Added support for the internal void type in generated headers

Tests

  • Added new cascading header test for the generated type

Comment on lines +24 to +25
uint64_t* __vtable;
uint64_t* _Internal_;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plc __VOID type is represented here as uint64_t* - this might be misleading for C/C++ developers and lead to them using this with intent that the actual underlying type does not support.

Copy link
Copy Markdown
Contributor Author

@Angus-Bethke-Bachmann Angus-Bethke-Bachmann Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a quick catch-up chat with @ghaith, and the reason we were thinking of using ints initially was due to the way we interpret void. I will verify that the IR handles void types as void (i.e. not ints), and if this is the case (which we suspect it is), then we can have the header generate the c void type for them. I will also write a quick lit test to prove the case works as intended.

@Angus-Bethke-Bachmann Angus-Bethke-Bachmann merged commit 64db436 into master Mar 31, 2026
33 checks passed
@Angus-Bethke-Bachmann Angus-Bethke-Bachmann deleted the anbt/PRG-3962 branch March 31, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pointer to __VOID does not generate type correctly

2 participants