Re: [Boost-bugs] [Boost C++ Libraries] #4381: GCC previous to 4.3.x does not implement inclass member initialization

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4381: GCC previous to 4.3.x does not implement inclass member initialization
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-26 21:25:07


#4381: GCC previous to 4.3.x does not implement inclass member initialization
-------------------------------------------------+--------------------------
  Reporter: Mario Ferreira <lioux@…> | Owner: johnmaddock
      Type: Bugs | Status: reopened
 Milestone: Boost 1.44.0 | Component: config
   Version: Boost 1.43.0 | Severity: Problem
Resolution: | Keywords: BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-------------------------------------------------+--------------------------
Changes (by Mario Ferreira <lioux@…>):

  * status: closed => reopened
  * resolution: invalid =>

Comment:

 Humm, that patch fixed the build of libtorrent-rasterbar 1.4.10 python
 bindings with gcc 4.2.1 on FreeBSD 8-STABLE.

 $ uname -a
 FreeBSD exxodus.fedaykin.here 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #10:
 Thu Jun 17 12:28:13 BRT 2010
 lioux_at_exxodus:/usr/obj/usr/src/sys/LIOUX amd64

         If that is not the proper patch, what other gcc 4.2.1 compilation
 glitch could have been avoided by setting that flag?

         I recompiled boost-libs without the patch then tried to compile
 the
 python bindings again. Then I got the following error:

 ----------------- BEGIN -----------------
 /usr/local/libexec/ccache/cc -DNDEBUG -O2 -pipe -march=athlon64
 -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -fno-strict-aliasing -O2
 -pipe -march=athlon64 -fno-strict-aliasing -fPIC -I/usr/local/include
 -I/usr/local/include/libtorrent -I/usr/local/include
 -I/usr/include/openssl -I/usr/local/include/python2.6 -c
 src/extensions.cpp -o
 build/temp.freebsd-8.1-PRERELEASE-amd64-2.6/src/extensions.o -DHAVE_SSL
 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION
 /usr/local/include/boost/type_traits/detail/cv_traits_impl.hpp: In
 instantiation of 'const bool
 boost::detail::cv_traits_imp<<unnamed>::torrent_plugin_wrap*>::is_volatile':
 /usr/local/include/boost/type_traits/is_volatile.hpp:52: instantiated
 from 'boost::is_volatile<<unnamed>::torrent_plugin_wrap>'
 /usr/local/include/boost/type_traits/remove_const.hpp:54: instantiated
 from 'boost::detail::remove_const_impl<<unnamed>::torrent_plugin_wrap>'
 /usr/local/include/boost/type_traits/remove_const.hpp:61: instantiated
 from 'boost::remove_const<<unnamed>::torrent_plugin_wrap>'
 /usr/local/include/boost/python/object/pointer_holder.hpp:127:
 instantiated from 'void* boost::python::objects::pointer_holder<Pointer,
 Value>::holds(boost::python::type_info, bool) [with Pointer =
 boost::shared_ptr<<unnamed>::torrent_plugin_wrap>, Value =
 <unnamed>::torrent_plugin_wrap]'
 src/extensions.cpp:168: instantiated from here
 /usr/local/include/boost/type_traits/detail/cv_traits_impl.hpp:38:
 internal compiler error: in make_rtl_for_nonlocal_decl, at
 cc1plus/../../../../contrib/gcc/cp/decl.c:4971
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://gcc.gnu.org/bugs.html> for instructions.
 error: command '/usr/local/libexec/ccache/cc' failed with exit status 1
 *** Error code 1
 1 error
 *** Error code 1
 ----------------- END -----------------

         Then I tried to obtain the preprocessed source with:

 $ gcc -v -save-temps -DNDEBUG -O2 -pipe -march=athlon64
 -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -fno-strict-aliasing -O2
 -pipe -march=athlon64 -fno-strict-aliasing -fPIC -I/usr/local/include
 -I/usr/local/include/libtorrent -I/usr/local/include
 -I/usr/include/openssl -I/usr/local/include/python2.6 -c
 src/extensions.cpp -o
 build/temp.freebsd-8.1-PRERELEASE-amd64-2.6/src/extensions.o -DHAVE_SSL
 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION

         The source and preprocessed files

 ./src/extensions.cpp
 ./extensions.ii
 ./extensions.s

 can be found at

 http://people.freebsd.org/~lioux/extensions_src__and__preprocessed.tar.gz.

 ----------------- BEGIN -----------------

 gcc: warning: -pipe ignored because -save-temps specified
 Using built-in specs.
 Target: amd64-undermydesk-freebsd
 Configured with: FreeBSD/amd64 system compiler
 Thread model: posix
 gcc version 4.2.1 20070719 [FreeBSD]
   /usr/libexec/cc1plus -E -quiet -v -I/usr/local/include
 -I/usr/local/include/libtorrent -I/usr/local/include
 -I/usr/include/openssl -I/usr/local/include/python2.6 -D_LONGLONG
 -DNDEBUG -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -DHAVE_SSL
 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION src/extensions.cpp
 -march=athlon64 -march=athlon64 -fno-strict-aliasing -fPIC -O2 -O2
 -fpch-preprocess -o extensions.ii
 ignoring duplicate directory "/usr/include"
 ignoring duplicate directory "/usr/local/include"
 #include "..." search starts here:
 #include <...> search starts here:
   /usr/local/include
   /usr/local/include/libtorrent
   /usr/include/openssl
   /usr/local/include/python2.6
   /usr/include/c++/4.2
   /usr/include/c++/4.2/backward
   /usr/include
 End of search list.
   /usr/libexec/cc1plus -fpreprocessed extensions.ii -quiet -dumpbase
 extensions.cpp -march=athlon64 -march=athlon64 -auxbase-strip
 build/temp.freebsd-8.1-PRERELEASE-amd64-2.6/src/extensions.o -O2 -O2
 -version -fno-strict-aliasing -fPIC -o extensions.s
 GNU C++ version 4.2.1 20070719 [FreeBSD] (amd64-undermydesk-freebsd)
          compiled by GNU C version 4.2.1 20070719 [FreeBSD].
 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 Compiler executable checksum: 00c8d3715b4cad4e2f9456e93053adc2
 /usr/local/include/boost/type_traits/detail/cv_traits_impl.hpp: In
 instantiation of 'const bool
 boost::detail::cv_traits_imp<<unnamed>::torrent_plugin_wrap*>::is_volatile':
 /usr/local/include/boost/type_traits/is_volatile.hpp:52: instantiated
 from 'boost::is_volatile<<unnamed>::torrent_plugin_wrap>'
 /usr/local/include/boost/type_traits/remove_const.hpp:54: instantiated
 from 'boost::detail::remove_const_impl<<unnamed>::torrent_plugin_wrap>'
 /usr/local/include/boost/type_traits/remove_const.hpp:61: instantiated
 from 'boost::remove_const<<unnamed>::torrent_plugin_wrap>'
 /usr/local/include/boost/python/object/pointer_holder.hpp:127:
 instantiated from 'void* boost::python::objects::pointer_holder<Pointer,
 Value>::holds(boost::python::type_info, bool) [with Pointer =
 boost::shared_ptr<<unnamed>::torrent_plugin_wrap>, Value =
 <unnamed>::torrent_plugin_wrap]'
 src/extensions.cpp:168: instantiated from here
 /usr/local/include/boost/type_traits/detail/cv_traits_impl.hpp:38:
 internal compiler error: in make_rtl_for_nonlocal_decl, at
 cc1plus/../../../../contrib/gcc/cp/decl.c:4971

 ----------------- END -----------------

   The offending 4971 from decl.c follows:

 ----------------- BEGIN -----------------
 4963: /* If we see a class member here, it should be a static data
 4964: member. */
 4965: if (DECL_LANG_SPECIFIC (decl) && DECL_IN_AGGR_P (decl))
 4966: {
 4967: gcc_assert (TREE_STATIC (decl));
 4968: /* An in-class declaration of a static data member should be
 4969: external; it is only a declaration, and not a definition.
 */
 4970: if (init == NULL_TREE)
 4971: gcc_assert (DECL_EXTERNAL (decl));
 4972: }
 ----------------- END -----------------

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4381#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC