aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-07-13 18:17:30 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-11-03 15:49:27 +0100
commit5926f30a8dcee9142360fdae445ebfdee4a528f9 (patch)
tree069e26b1d046c81818e9caf558121910a6ef11a0 /libgcc
parent4bfc5091a6a489d9fa5558f0fbcff11d65e1837b (diff)
downloadgcc-5926f30a8dcee9142360fdae445ebfdee4a528f9.zip
gcc-5926f30a8dcee9142360fdae445ebfdee4a528f9.tar.gz
gcc-5926f30a8dcee9142360fdae445ebfdee4a528f9.tar.bz2
GCN: Address undeclared 'NULL' usage in 'libgcc/config/gcn/gthr-gcn.h:__gthread_getspecific'
For 'libgcc/config/gcn/gthr-gcn.h' used in libstdc++ context (WIP), we have: [...]/build-gcc-offload-amdgcn-amdhsa/amdgcn-amdhsa/libstdc++-v3/include/amdgcn-amdhsa/bits/gthr-default.h: In function ‘void* __gthread_getspecific(__gthread_key_t)’: [...]/build-gcc-offload-amdgcn-amdhsa/amdgcn-amdhsa/libstdc++-v3/include/amdgcn-amdhsa/bits/gthr-default.h:90:10: error: ‘NULL’ was not declared in this scope 90 | return NULL; | ^~~~ Resolve this with 's%NULL%0', as is used in 'libgcc/gthr-single.h:__gthread_getspecific', for example. Follow-up to commit 76d463310787c8c7fd0c55cf88031b240311ab68 "Create GCN-specific gthreads". libgcc/ * config/gcn/gthr-gcn.h (__gthread_getspecific): 's%NULL%0'.
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config/gcn/gthr-gcn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgcc/config/gcn/gthr-gcn.h b/libgcc/config/gcn/gthr-gcn.h
index a0bfde2..d81b27d 100644
--- a/libgcc/config/gcn/gthr-gcn.h
+++ b/libgcc/config/gcn/gthr-gcn.h
@@ -87,7 +87,7 @@ __gthread_key_delete (__gthread_key_t __key __attribute__ ((__unused__)))
static inline void *
__gthread_getspecific (__gthread_key_t __key __attribute__((unused)))
{
- return NULL;
+ return 0;
}
static inline int