Re: [boost] [Serialization] Errors when compiling using GCC 3.4

Allen Yao wrote:
I just updated my gcc from 3.3.3 to 3.4, and found that the serialization17 and serialization18 cannot compile. There are many error messages, some of them seem to caused by lack of "typename", others are very strange, for example, about using boost::noncopyable.
Does someone try serialization library on GCC 3.4? Can it be compiled? I suspect I am missing something. Otherwise, I would like to try to "fix" the "bugs" myself.
Hmmm, I just checked. I'm currently using gcc 3.3.1 ? Should I upgrade to gcc 3.4.? I seem to recall information on the list that suggested it would be better to wait a little bit. If upgrading is a good thing - now is a good time for me to do it as I'm just finalizing all the changes for next version and just starting the "torture test torture" procedure of reconciliation of compiler quirks. Robert Ramey

I fixed bugs in serialization18 yesterday. The bugs are almost all about dependent names: - lacking "this->" before "This()", "base_reference()", "newtoken()", "end_preamble()", and some data members inherited from templated base class. (BTW: using -fpermissive cannot fix the bugs about dependent data members.) I cannot find why the following cannot compile using GCC 3.4: in $SERIALIZATION_ROOT/libs/src/basic_oarchive.cpp: inline void basic_oarchive_impl::save_pointer( basic_oarchive & ar, const void * t, const basic_oserializer_pointer & bos_ptr ){ ... ar << class_name_type(key); // This line causes an error message said that // boost::noncopyable's ctor is private. Strange! ... } I am eager to see Ramey's post-review version of the Serialization Library, for I am using the library in my current project. Best Regards. "Robert Ramey" <ramey@rrsd.com> ???? news:20040523160921.29D6D31472@acme.west.net...
Allen Yao wrote:
I just updated my gcc from 3.3.3 to 3.4, and found that the serialization17 and serialization18 cannot compile. There are many error messages, some of them seem to caused by lack of "typename", others are very strange, for example, about using boost::noncopyable.
Does someone try serialization library on GCC 3.4? Can it be compiled? I suspect I am missing something. Otherwise, I would like to try to "fix" the "bugs" myself.
Hmmm, I just checked. I'm currently using gcc 3.3.1 ? Should I upgrade to gcc 3.4.? I seem to recall information on the list that suggested it would be better to wait a little bit. If upgrading is a good thing - now is a good time for me to do it as I'm just finalizing all the changes for next version and just starting the "torture test torture" procedure of reconciliation of compiler quirks.
Robert Ramey
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Allen Yao wrote:
inline void basic_oarchive_impl::save_pointer( basic_oarchive & ar, const void * t, const basic_oserializer_pointer & bos_ptr ){ ... ar << class_name_type(key); // This line causes an error message said that // boost::noncopyable's ctor is private. Strange! ... }
See: http://gcc.gnu.org/bugs.html#cxx_rvalbind which explains the problem. In a nutshell: ------------------------------------- struct A : boost::noncopyable {}; void foo(const A& a); foo(A()); // ill-formed ------------------------------------- but it used to be accepted, and it is still (wrongly) accepted by many compilers. Also I suggest you to have a look at http://gcc.gnu.org/gcc-3.4/changes.html to see the main changes in GCC 3.4.0 that affects C++ code. -- Giovanni Bajo

Thank you for your patient explanation. I'll look into it carefully.:) "Giovanni Bajo" <giovannibajo@libero.it> ÐŽÈëÓÊŒþ news:c93juu$soo$1@sea.gmane.org...
See: http://gcc.gnu.org/bugs.html#cxx_rvalbind which explains the problem. Also I suggest you to have a look at http://gcc.gnu.org/gcc-3.4/changes.html to see the main changes in GCC 3.4.0 that affects C++ code. -- Giovanni Bajo

Hi, On Mon, May 24, 2004 at 09:14:37AM +0800, Allen Yao wrote:
I fixed bugs in serialization18 yesterday. The bugs are almost all about dependent names:
- lacking "this->" before "This()", "base_reference()", "newtoken()", "end_preamble()", and some data members inherited from templated base class. (BTW: using -fpermissive cannot fix the bugs about dependent data members.)
Are these patches somewhere available until Robert Ramey checks the serialization library into CVS (at which time these problems will be resolved, I hope)? On Thu, May 27, 2004 at 04:31:58AM +0200, Giovanni Bajo wrote:
Allen Yao wrote:
inline void basic_oarchive_impl::save_pointer( basic_oarchive & ar, const void * t, const basic_oserializer_pointer & bos_ptr ){ ... ar << class_name_type(key); // This line causes an error message said that // boost::noncopyable's ctor is private. Strange! ... }
See: http://gcc.gnu.org/bugs.html#cxx_rvalbind which explains the problem. In a nutshell: ------------------------------------- struct A : boost::noncopyable {}; void foo(const A& a);
foo(A()); // ill-formed ------------------------------------- but it used to be accepted, and it is still (wrongly) accepted by many compilers.
Before I spend time looking into it, does anyone have a patch that resolves this issue? Thanks Christoph -- http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html

Robert Ramey wrote:
Hmmm, I just checked. I'm currently using gcc 3.3.1 ? Should I upgrade to gcc 3.4.? I seem to recall information on the list that suggested it would be better to wait a little bit.
GCC 3.4.0 features a brand new C++ parser and much more strict conformance to the standard. I would strongly suggest you to upgrade. There are of course some fallouts from this work, so if you need an absolutely stable environment you may want to wait for 3.4.1. But of course, you can have 3.4.0 installed and keep 3.3.1 around if you feel like it. -- Giovanni Bajo
participants (4)
-
Allen Yao
-
Christoph Ludwig
-
Giovanni Bajo
-
Robert Ramey