GCN: Address undeclared 'NULL' usage in 'libgcc/config/gcn/gthr-gcn.h:__gthread_getsp...
commit5926f30a8dcee9142360fdae445ebfdee4a528f9
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 13 Jul 2022 16:17:30 +0000 (13 18:17 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 3 Nov 2023 14:49:27 +0000 (3 15:49 +0100)
tree069e26b1d046c81818e9caf558121910a6ef11a0
parent4bfc5091a6a489d9fa5558f0fbcff11d65e1837b
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'.
libgcc/config/gcn/gthr-gcn.h