Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
atomicrmw_with_enum_op_not_.Xchg.zig
pretty
plain
permalink
blame
history
•
14 lines
•
244 B
1
export fn entry() void {
2
const E = enum(u8) {
3
a,
4
b,
5
c,
6
d,
7
};
8
var x: E = .a;
9
_ = @atomicRmw(E, &x, .Add, .b, .seq_cst);
10
}
11
12
// error
13
//
14
// :9:28: error: @atomicRmw with enum only allowed with .Xchg