aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-01-27 09:51:51 +0100
committerAlex Rønne Petersen <alex@alexrp.com>2025-01-28 13:01:35 +0100
commitaa37a5a0c4e5a74aebc029c6513f762da2208658 (patch)
treecf8da9dd0f7057b2c121857908e725aedec90a54 /lib/std
parent183bb8b08403ab594cdc543c2db2503e7eac0052 (diff)
downloadzig-aa37a5a0c4e5a74aebc029c6513f762da2208658.tar.gz
zig-aa37a5a0c4e5a74aebc029c6513f762da2208658.zip
zig.h: Add some casts to __atomic macros to shut Clang warnings up.
This is a stupid Clang-ism: ❯ cat test.c int main() { int value = 42; int const *value_ptr = &value; int location; __atomic_store(&location, value_ptr, __ATOMIC_SEQ_CST); } ❯ gcc test.c -fsyntax-only ❯ clang test.c -fsyntax-only test.c:5:31: warning: passing 'const int *' to parameter of type 'int *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] 5 | __atomic_store(&location, value_ptr, __ATOMIC_SEQ_CST); | ^~~~~~~~~ 1 warning generated. I have no idea why Clang doesn't define these builtins as taking const pointers for the parameters that are only read from. Anyway, after the next zig1.wasm update, this change should shut up these warnings that we've been seeing in CI during bootstrap for ages.
Diffstat (limited to 'lib/std')
0 files changed, 0 insertions, 0 deletions