Compiler error when building global arrays of empty Structs #21761
Labels
Bug
This tag is applied to issues which reports bugs.
Compiler: Clang
Bugs/feature requests, that are related to compiler Clang
Describe the bug
Consider the following code:
When built with the following invocation, the compilation fails:
On the other hand, if DummyStruct is non-empty then the compilation succeeds.
Consider the following:
The only change is that DummyStruct now has a dummy_item.
The compilation succeeds as follows:
NOTE:
Reproduction Steps
See above
Expected Behavior
Structs containing no members is a perfectly valid use case and is often referenced in the official documentation. There is nothing special about them that warrants a compiler build failure in the case of global arrays.
Current Behavior
See bug description above.
Possible Solution
No response
Additional Information/Context
No response
V version
0.4.6 23e3894
Environment details (OS name and version, etc.)
macOS 14.5 arm64
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: