]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime/testdata: fix for C23 nullptr keyword
authorIan Lance Taylor <iant@golang.org>
Sat, 19 Oct 2024 02:51:00 +0000 (19:51 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 19 Oct 2024 03:18:31 +0000 (20:18 -0700)
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

gcc/go/gofrontend/MERGE
libgo/go/runtime/testdata/testprogcgo/threadprof.go

index 3a839410e9cc11085de54a14dc8468589f91f24d..c39aca9b1b008db8295cd285cd4d61a21a4e50eb 100644 (file)
@@ -1,4 +1,4 @@
-6aa463fef2d8f04e0bd2675f63a6529df080a44a
+092668d6ce6d7b3aff6797247cd53dc44319c558
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index d62d4b4be839f7cb2bc9bb495c6d636dd3746d1a..f61c51b8b6234cb651a2e00fe045a1995e403d60 100644 (file)
@@ -36,10 +36,10 @@ __attribute__((constructor)) void issue9456() {
        }
 }
 
-void **nullptr;
+void **nullpointer;
 
 void *crash(void *p) {
-       *nullptr = p;
+       *nullpointer = p;
        return 0;
 }