[Bug c++/14618] New: Cannot compile test_thread.cpp from boost

schmid at snake dot iap dot physik dot tu-darmstadt dot de gcc-bugzilla@gcc.gnu.org
Wed Mar 17 09:38:00 GMT 2004


The following code s.C, reduced from the original file libs/thread/test/
test_thread.cpp included in current boost repository, is rejected by gcc 3.4, 
but accepted by gcc 3.3. I have not investigated but given the error messages I 
guess this problem is also responsible for the failure of the libs/python/test/
embedding.cpp test. This looks like a regression to me. 
 
source code s.C  
 
namespace boost { 
class noncopyable 
{ 
 protected: 
    noncopyable() {} 
    ~noncopyable() {} 
 private: 
    noncopyable( const noncopyable& ); 
    const noncopyable& operator=( const noncopyable& ); 
}; 
 
 
class thread : private noncopyable 
{ 
public: 
    bool operator==(const thread& other) const; 
}; 
} // namespace boost 
 
 
void comparison_thread(boost::thread* parent) 
{ 
    boost::thread thrd; 
    if (thrd == boost::thread()) ; 
} 
 
g++ -v -W -Wall -c s.C  
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs 
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c
++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug 
Thread model: posix 
gcc version 3.4.0 20040313 (prerelease) 
 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -quiet -v -D_GNU_SOURCE 
s.C -quiet -dumpbase s.C -mtune=pentiumpro -auxbase s -W -Wall -version -o /
tmp/ccRINl8i.s 
ignoring nonexistent directory "NONE/include" 
ignoring nonexistent directory "/usr/local/lib/gcc/
i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
i686-pc-linux-gnu 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
backward 
 /usr/local/include 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include 
 /usr/include 
End of search list. 
GNU C++ version 3.4.0 20040313 (prerelease) (i686-pc-linux-gnu) 
	compiled by GNU C version 3.4.0 20040313 (prerelease). 
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274 
s.C: In copy constructor `boost::thread::thread(const boost::thread&)': 
s.C:8: error: `boost::noncopyable::noncopyable(const boost::noncopyable&)' is 
private 
s.C:24: error: within this context 
s.C: In function `void comparison_thread(boost::thread*)': 
s.C:22: warning: unused parameter 'parent'

-- 
           Summary: Cannot compile test_thread.cpp from boost
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schmid at snake dot iap dot physik dot tu-darmstadt dot
                    de
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list