Sometimes the wrong pthread_join is picked from the pthread.h include file. This is because __INITIAL_POINTER_SIZE is not defined if the /pointer qualifier is not present. See the following example:
Code: Select all
rumba-jj) cxx/vers
clang version 10.0.1 (git@bitbucket.org:vms_software/llvm-10.0.1.git d469fd71c59
f33c7d998debe420a69abb31f1f57)
Build date: 06-16-2023
Target: x86_64-OpenVMS
Thread model: posix
InstalledDir: RUMBA$DKA100:[SYS0.SYSCOMMON.][SYSEXE]
rumba-jj) ty test.cxx
#include <pthread.h>
int main()
{
pthread_t id;
void** num;
int i;
i = pthread_join( id , num );
}
28-JUN-2023 08:46:46
rumba-jj) cxx test.cxx
$DISK6:[JOUKJ.test]test.cxx;39:8:8: error: no matching function for call to 'pth
read_join32'
i = pthread_join( id , num );
^~~~~~~~~~~~
/SYS$COMMON/VSICXX$LIB/INCLUDE/SYS$STARLET_C/pthread.h:1641:24: note: expanded f
rom macro 'pthread_join'
# define pthread_join pthread_join32
^~~~~~~~~~~~~~
/SYS$COMMON/VSICXX$LIB/INCLUDE/SYS$STARLET_C/pthread.h:1634:12: note: candidate
function not viable: no known conversion from 'void **' to '__pthreadShortAddr_t
*' (aka '__sptr __ptr32 void **') for 2nd argument
extern int pthread_join32 (pthread_t, __pthreadShortAddr_t*);
^
1 error generated.
rumba-jj) cxx/point=64 test.cxx
rumba-jj)