| ... | @@ -1471,21 +1471,25 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -1471,21 +1471,25 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 1471 | \\} | 1471 | \\} |
| 1472 | }); | 1472 | }); |
| 1473 | | 1473 | |
| 1474 | cases.add("type referenced struct", | 1474 | if (builtin.os != .windows) { |
| 1475 | \\struct Foo { | 1475 | // When clang uses the <arch>-windows-none triple it behaves as MSVC and |
| 1476 | \\ struct Bar{ | 1476 | // interprets the inner `struct Bar` as an anonymous structure |
| 1477 | \\ int b; | 1477 | cases.add("type referenced struct", |
| 1478 | \\ }; | 1478 | \\struct Foo { |
| 1479 | \\ struct Bar c; | 1479 | \\ struct Bar{ |
| 1480 | \\}; | 1480 | \\ int b; |
| 1481 | , &[_][]const u8{ | 1481 | \\ }; |
| 1482 | \\pub const struct_Bar = extern struct { | 1482 | \\ struct Bar c; |
| 1483 | \\ b: c_int, | 1483 | \\}; |
| 1484 | \\}; | 1484 | , &[_][]const u8{ |
| 1485 | \\pub const struct_Foo = extern struct { | 1485 | \\pub const struct_Bar = extern struct { |
| 1486 | \\ c: struct_Bar, | 1486 | \\ b: c_int, |
| 1487 | \\}; | 1487 | \\}; |
| 1488 | }); | 1488 | \\pub const struct_Foo = extern struct { |
| | 1489 | \\ c: struct_Bar, |
| | 1490 | \\}; |
| | 1491 | }); |
| | 1492 | } |
| 1489 | | 1493 | |
| 1490 | cases.add("undefined array global", | 1494 | cases.add("undefined array global", |
| 1491 | \\int array[100] = {}; | 1495 | \\int array[100] = {}; |