mirror of
https://github.com/ziglang/zig.git
synced 2025-12-24 15:13:08 +00:00
Add compile error test case for union layout depending on pointer alignment
This commit is contained in:
parent
fb523c6283
commit
825da34769
@ -0,0 +1,11 @@
|
|||||||
|
const U = union {
|
||||||
|
next: ?*align(1) U align(128),
|
||||||
|
};
|
||||||
|
|
||||||
|
export fn entry() usize {
|
||||||
|
return @alignOf(U);
|
||||||
|
}
|
||||||
|
|
||||||
|
// error
|
||||||
|
//
|
||||||
|
// :1:11: error: union layout depends on being pointer aligned
|
||||||
Loading…
x
Reference in New Issue
Block a user