Bug 36694 - g++-4.2 rejects code, that other versions of gcc accept
Summary: g++-4.2 rejects code, that other versions of gcc accept
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.4
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-02 10:58 UTC by tim blechmann
Modified: 2011-03-29 17:17 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-10-20 21:55:26


Attachments
compressed preprocessed source (230.33 KB, application/x-bzip)
2008-07-02 10:58 UTC, tim blechmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim blechmann 2008-07-02 10:58:01 UTC
the attached preprocessed source does not compile with g++-4.2. it does compile with g++-4.0, 4.1 and 4.3, though, so i don't know whether there is any interest to work on a reduced test case and work on a bug fix ... 

from my reading of the compiler error, it has to do with the compiler-generated copy constructor ...

g++-4.2 -v:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.4 (Debian 4.2.4-2+b1)
Comment 1 tim blechmann 2008-07-02 10:58:45 UTC
Created attachment 15843 [details]
compressed preprocessed source
Comment 2 Ralf Wildenhues 2008-07-02 16:12:27 UTC
Please post the compile command and the error.
Comment 3 tim blechmann 2008-07-02 16:15:47 UTC
compiled via:
g++-4.2 server_dsp_thread_test.ii 

error message:
libs/boost/boost/concept_check.hpp: In instantiation of ‘boost::CopyConstructible<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>’:
libs/boost/boost/concept_check.hpp:154:   instantiated from ‘boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>’
libs/boost/boost/concept/detail/has_constraints.hpp:40:   instantiated from ‘const bool boost::concept::not_satisfied<boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >::value’
libs/boost/boost/concept/detail/has_constraints.hpp:43:   instantiated from ‘boost::concept::not_satisfied<boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
libs/boost/boost/mpl/if.hpp:67:   instantiated from ‘boost::mpl::if_<boost::concept::not_satisfied<boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >, boost::concept::constraint<boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >, boost::concept::requirement<boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> > >’
libs/boost/boost/concept/detail/general.hpp:19:   instantiated from ‘boost::concept::requirement_<void (*)(boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>)>’
libs/lockfree/fifo.hpp:60:   instantiated from ‘lockfree::detail::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
libs/lockfree/fifo.hpp:272:   instantiated from ‘lockfree::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
testsuite/../source/server/dsp_thread_queue.hpp:315:   instantiated from ‘nova::dsp_queue_interpreter<<unnamed>::dummy_runnable>’
testsuite/../source/server/dsp_thread.hpp:87:   instantiated from ‘nova::dsp_threads<<unnamed>::dummy_runnable>’
testsuite/server_dsp_thread_test.cpp:32:   instantiated from here
libs/boost/boost/concept_check.hpp:156: error: ‘boost::concept::requirement<Model>::failed [with Model = boost::concept::usage_requirements<boost::CopyConstructible<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >]’ is not a valid template argument for type ‘void (*)()’ because function ‘static void boost::concept::requirement<Model>::failed() [with Model = boost::concept::usage_requirements<boost::CopyConstructible<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >]’ has not external linkage
libs/lockfree/fifo.hpp: In instantiation of ‘lockfree::detail::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’:
libs/lockfree/fifo.hpp:272:   instantiated from ‘lockfree::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
testsuite/../source/server/dsp_thread_queue.hpp:315:   instantiated from ‘nova::dsp_queue_interpreter<<unnamed>::dummy_runnable>’
testsuite/../source/server/dsp_thread.hpp:87:   instantiated from ‘nova::dsp_threads<<unnamed>::dummy_runnable>’
testsuite/server_dsp_thread_test.cpp:32:   instantiated from here
libs/lockfree/fifo.hpp:60: error: ‘boost::concept::requirement<Model>::failed [with Model = boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>]’ is not a valid template argument for type ‘void (*)()’ because function ‘static void boost::concept::requirement<Model>::failed() [with Model = boost::CopyConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>]’ has not external linkage
libs/boost/boost/concept_check.hpp: In instantiation of ‘boost::DefaultConstructible<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>’:
libs/boost/boost/concept_check.hpp:127:   instantiated from ‘boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>’
libs/boost/boost/concept/detail/has_constraints.hpp:40:   instantiated from ‘const bool boost::concept::not_satisfied<boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >::value’
libs/boost/boost/concept/detail/has_constraints.hpp:43:   instantiated from ‘boost::concept::not_satisfied<boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
libs/boost/boost/mpl/if.hpp:67:   instantiated from ‘boost::mpl::if_<boost::concept::not_satisfied<boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >, boost::concept::constraint<boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >, boost::concept::requirement<boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> > >’
libs/boost/boost/concept/detail/general.hpp:19:   instantiated from ‘boost::concept::requirement_<void (*)(boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>)>’
libs/lockfree/fifo.hpp:61:   instantiated from ‘lockfree::detail::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
libs/lockfree/fifo.hpp:272:   instantiated from ‘lockfree::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
testsuite/../source/server/dsp_thread_queue.hpp:315:   instantiated from ‘nova::dsp_queue_interpreter<<unnamed>::dummy_runnable>’
testsuite/../source/server/dsp_thread.hpp:87:   instantiated from ‘nova::dsp_threads<<unnamed>::dummy_runnable>’
testsuite/server_dsp_thread_test.cpp:32:   instantiated from here
libs/boost/boost/concept_check.hpp:129: error: ‘boost::concept::requirement<Model>::failed [with Model = boost::concept::usage_requirements<boost::DefaultConstructible<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >]’ is not a valid template argument for type ‘void (*)()’ because function ‘static void boost::concept::requirement<Model>::failed() [with Model = boost::concept::usage_requirements<boost::DefaultConstructible<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >]’ has not external linkage
libs/lockfree/fifo.hpp: In instantiation of ‘lockfree::detail::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’:
libs/lockfree/fifo.hpp:272:   instantiated from ‘lockfree::fifo<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*, false, 1024u, std::allocator<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*> >’
testsuite/../source/server/dsp_thread_queue.hpp:315:   instantiated from ‘nova::dsp_queue_interpreter<<unnamed>::dummy_runnable>’
testsuite/../source/server/dsp_thread.hpp:87:   instantiated from ‘nova::dsp_threads<<unnamed>::dummy_runnable>’
testsuite/server_dsp_thread_test.cpp:32:   instantiated from here
libs/lockfree/fifo.hpp:61: error: ‘boost::concept::requirement<Model>::failed [with Model = boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>]’ is not a valid template argument for type ‘void (*)()’ because function ‘static void boost::concept::requirement<Model>::failed() [with Model = boost::DefaultConstructibleConcept<nova::dsp_thread_queue_item<<unnamed>::dummy_runnable>*>]’ has not external linkage
Comment 4 Jonathan Wakely 2010-10-20 21:55:26 UTC
I can't compile the preprocessed source with GCC 4.4, but that's pretty normal for anything that includes boost because it uses so much conditional compilation.

do you by any chance still have the origianl un-preprocessed source?
if not, I don't think this will be fixed, gcc 4.2 is no longer supported so if it works with 4.3 (and I hope later versions) then it won't be fixed now
Comment 5 Jonathan Wakely 2011-03-29 17:17:57 UTC
GCC 4.2 is no longer maintained, please reopen if you can reproduce this with a current release (4.3 or later)