| 1 | const p: *anyopaque = undefined; |
| 2 | export fn a() void { |
| 3 | _ = @ptrCast(@ptrCast(p)); |
| 4 | } |
| 5 | export fn b() void { |
| 6 | const ptr1: *u32 = @alignCast(@ptrCast(@alignCast(p))); |
| 7 | _ = ptr1; |
| 8 | } |
| 9 | export fn c() void { |
| 10 | _ = @constCast(@alignCast(@ptrCast(@constCast(@volatileCast(p))))); |
| 11 | } |
| 12 | |
| 13 | // error |
| 14 | // |
| 15 | // :3:18: error: redundant @ptrCast |
| 16 | // :6:44: error: redundant @alignCast |
| 17 | // :10:40: error: redundant @constCast |