diff options
author | Ian Lance Taylor <iant@golang.org> | 2024-10-18 19:51:00 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2024-10-18 20:18:31 -0700 |
commit | 04b4a5e4866daa7b6f4a4a3e7ed1a23f7787841d (patch) | |
tree | a24186f63221135e5a68a19163decf04265fe32b /libgo/go/runtime | |
parent | 83abdb041426b7490e93c3f77be93148bcd94de3 (diff) | |
download | gcc-04b4a5e4866daa7b6f4a4a3e7ed1a23f7787841d.zip gcc-04b4a5e4866daa7b6f4a4a3e7ed1a23f7787841d.tar.gz gcc-04b4a5e4866daa7b6f4a4a3e7ed1a23f7787841d.tar.bz2 |
runtime/testdata: fix for C23 nullptr keyword
Backport https://go.dev/cl/620955 from main repo. Original description:
src/runtime/testdata/testprogcgo/threadprof.go contains C code with a
variable called nullptr. This conflicts with the nullptr keyword in
the C23 revision of the C standard (showing up as gccgo test build
failures when updating GCC to use C23 by default when building C
code).
Rename that variable to nullpointer to avoid the clash with the
keyword (any other name that's not a keyword would work just as well).
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/621059
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r-- | libgo/go/runtime/testdata/testprogcgo/threadprof.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/runtime/testdata/testprogcgo/threadprof.go b/libgo/go/runtime/testdata/testprogcgo/threadprof.go index d62d4b4..f61c51b 100644 --- a/libgo/go/runtime/testdata/testprogcgo/threadprof.go +++ b/libgo/go/runtime/testdata/testprogcgo/threadprof.go @@ -36,10 +36,10 @@ __attribute__((constructor)) void issue9456() { } } -void **nullptr; +void **nullpointer; void *crash(void *p) { - *nullptr = p; + *nullpointer = p; return 0; } |