-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translate-c: Demote initialization of opaque types
This fixes a segfault in translate-c that would previously occur when initializing structs with unnamed bitfields, due to a failed assertion in `transInitListExprRecord`. Unnamed bitfields do not have initializers, so `transInitListExprRecord` erroneously assumes that `init_count` equals the number of fields in the record. Since attempting to initialize an opaque type is a syntax error in Zig, we can just demote any attempts to initialize them.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters