-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.
Milestone
Description
Zig Version
0.12.0-dev.601+f4c884617
Steps to Reproduce and Observed Behavior
// zig build-exe -target x86_64-windows -lc
const c = @cImport(@cInclude("audioclient.h"));
pub fn main() !void {
var x: c.TYPEDESC = undefined;
_ = x;
}cimport.zig:43579:34: error: union '...cimport.union_unnamed_290' depends on itself
const union_unnamed_290 = extern union {
~~~~~~~^~~~~
cimport.zig:43585:5: note: while checking this field
unnamed_0: union_unnamed_290 = @import("std").mem.zeroes(union_unnamed_290),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~```
mingw header:
typedef struct tagTYPEDESC {
__C89_NAMELESS union {
struct tagTYPEDESC *lptdesc;
struct tagARRAYDESC *lpadesc;
HREFTYPE hreftype;
} __C89_NAMELESSUNIONNAME;
VARTYPE vt;
} TYPEDESC;cimport.zig:
const union_unnamed_290 = extern union {
lptdesc: [*c]struct_tagTYPEDESC,
lpadesc: [*c]struct_tagARRAYDESC,
hreftype: HREFTYPE,
};
pub const struct_tagTYPEDESC = extern struct {
unnamed_0: union_unnamed_290 = @import("std").mem.zeroes(union_unnamed_290),
vt: VARTYPE = @import("std").mem.zeroes(VARTYPE),
};
pub const TYPEDESC = struct_tagTYPEDESC;Expected Behavior
Compiles successfully in 0.11.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.