[Bug c++/50423] New: error: ‘getpid’ was not declared in this scope

howarth at nitro dot med.uc.edu gcc-bugzilla@gcc.gnu.org
Thu Sep 15 17:57:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50423

             Bug #: 50423
           Summary: error: ‘getpid’ was not declared in this scope
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: howarth@nitro.med.uc.edu


Created attachment 25294
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25294
bzip2 compressed preprocessed source for common/semaphore.cc

Current gcc trunk produces a compile time error for common/semaphore.cc in
xplor-nih 2.27...

g++-fsf-4.7 -c semaphore.cc -O3 -ffast-math -funroll-loops -g -fpermissive 
-DX_MMAP_FLAGS=0 -DFORTRAN_INIT -fno-common  -DDARWIN -D_REENTRANT -DNDEBUG 
-I/Users/howarth/xplor-nih-2.27/common/
-I/Users/howarth/xplor-nih-2.27/arch/Darwin_11_x86_64/include
-I/Users/howarth/xplor-nih-2.27/CDSlib -I/Users/howarth/xplor-nih-2.27/intVar
-I/Users/howarth/xplor-nih-2.27/pcre -DCPLUSPLUS -DUSE_CDS_NAMESPACE
-I/Users/howarth/xplor-nih-2.27/common/
-I/Users/howarth/xplor-nih-2.27/arch/Darwin_11_x86_64/include
semaphore.cc: In constructor ‘CDS::Semaphore::Semaphore(bool)’:
semaphore.cc:111:30: error: ‘getpid’ was not declared in this scope
semaphore.cc: In destructor ‘CDS::Semaphore::~Semaphore()’:
semaphore.cc:124:36: error: ‘getpid’ was not declared in this scope
semaphore.cc:126:9: warning: deleting ‘void*’ is undefined [enabled by default]

which doesn't occur with gcc-4_6-branch...

[MacPro:~/xplor-nih-2.27/common/bin.Darwin_11_x86_64] howarth% g++-fsf-4.6  -c
semaphore.cc -O3 -ffast-math -funroll-loops -g -fpermissive  -DX_MMAP_FLAGS=0
-DFORTRAN_INIT -fno-common  -DDARWIN -D_REENTRANT -DNDEBUG 
-I/Users/howarth/xplor-nih-2.27/common/
-I/Users/howarth/xplor-nih-2.27/arch/Darwin_11_x86_64/include
-I/Users/howarth/xplor-nih-2.27/CDSlib -I/Users/howarth/xplor-nih-2.27/intVar
-I/Users/howarth/xplor-nih-2.27/pcre -DCPLUSPLUS -DUSE_CDS_NAMESPACE
-I/Users/howarth/xplor-nih-2.27/common/
-I/Users/howarth/xplor-nih-2.27/arch/Darwin_11_x86_64/include
semaphore.cc: In destructor ‘CDS::Semaphore::~Semaphore()’:
semaphore.cc:126:9: warning: deleting ‘void*’ is undefined [enabled by default]



More information about the Gcc-bugs mailing list