Two issues with the IBM xlC compiler

Dear Boosters, I've got a patch to report for the IBM Viisual Age C++ compiler xlC, and one other problem to discuss. The patch we found necessary for version 6.0 of the compiler is: diff -u -r1.26 filtered_graph.hpp --- boost/graph/filtered_graph.hpp 22 Nov 2003 01:18:37 -0000 1.26 +++ boost/graph/filtered_graph.hpp 1 Jul 2004 14:11:27 -0000 @@ -208,8 +208,8 @@ > edge_iterator; typedef typename Traits::edges_size_type edges_size_type; - typedef typename edge_property_type<Graph>::type edge_property_type; - typedef typename vertex_property_type<Graph>::type vertex_property_type; + typedef typename ::boost::edge_property_type<Graph>::type edge_property_type; + typedef typename ::boost::vertex_property_type<Graph>::type vertex_property_type; typedef filtered_graph_tag graph_tag; //private: The original version just gives compiler errors, probably incorrectly but it does. The second problem is in the configure files. Who is responsible for maintaining them? The issue is the following patch I found necessary: --- boost/config/compiler/vacpp.hpp 22 Jun 2004 12:33:06 -0000 1.16 +++ boost/config/compiler/vacpp.hpp 1 Jul 2004 14:11:23 -0000 @@ -26,7 +26,7 @@ #endif #if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +//# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS #endif in-class member initializtions seem to work flawlessly on this compiler, so I wonder why BOOST_NO_INCLASS_MEMBER_INITIALIZATION is defined. Having it defined causes problems with the Boost random library, which then tries to initializes values of an enum tto a 64-bit integer, which fails. Is there a reason why BOOST_NO_INCLASS_MEMBER_INITIALIZATION is defined for this compiler or is this a bug? Best regards, Matthias

On Thursday 01 July 2004 9:24 am, Matthias Troyer wrote:
diff -u -r1.26 filtered_graph.hpp --- boost/graph/filtered_graph.hpp 22 Nov 2003 01:18:37 -0000 1.26 +++ boost/graph/filtered_graph.hpp 1 Jul 2004 14:11:27 -0000 @@ -208,8 +208,8 @@
> edge_iterator;
typedef typename Traits::edges_size_type edges_size_type;
- typedef typename edge_property_type<Graph>::type edge_property_type; - typedef typename vertex_property_type<Graph>::type vertex_property_type; + typedef typename ::boost::edge_property_type<Graph>::type edge_property_type; + typedef typename ::boost::vertex_property_type<Graph>::type vertex_property_type; typedef filtered_graph_tag graph_tag;
//private:
The original version just gives compiler errors, probably incorrectly but it does.
Committed; thanks!
The second problem is in the configure files. Who is responsible for maintaining them? The issue is the following patch I found necessary:
John Maddock is primarily responsible for configuration, but he's on vacation currently. If nobody objects in the next day or so, let's commit this patch as well. Doug

The second problem is in the configure files. Who is responsible for maintaining them? The issue is the following patch I found necessary:
John Maddock is primarily responsible for configuration, but he's on vacation currently. If nobody objects in the next day or so, let's commit this
patch
as well.
Almost gone :-) Toon Knappen probably knows why that macro was set (he runs the regression tests for that compiler), so if you can figure it out between you that would be great. Thanks, John.

On Jul 1, 2004, at 4:47 PM, Doug Gregor wrote:
On Thursday 01 July 2004 9:24 am, Matthias Troyer wrote:
diff -u -r1.26 filtered_graph.hpp [snip] The original version just gives compiler errors, probably incorrectly but it does.
Committed; thanks!
The second problem is in the configure files. Who is responsible for maintaining them? The issue is the following patch I found necessary:
John Maddock is primarily responsible for configuration, but he's on vacation currently. If nobody objects in the next day or so, let's commit this patch as well.
Doug
Thanks! Matthias

A recent change to the file boost/graph/detail/adj_list_edge_iterator.hpp breaks the BGL on the IBM xlC compiler. The change is: revision 1.7 date: 2004/08/24 22:00:33; author: dgregor; state: Exp; lines: +11 -10 Use boost::optional to avoid copying singular iterators The problem is that on the IBM compiler unfortunately, for some strange reason the destructor of boost::optional fails to compile if the type is an OutEdgeIterator, as can be seen in the following program that fails: #include <boost/graph/adjacency_list.hpp> using namespace boost; int main() { typedef adjacency_list<vecS,vecS,directedS> G; typedef boost::graph_traits<G>::out_edge_iterator OutEdgeIterator; boost::optional<OutEdgeIterator> edges; } with the horrible error messages listed below. Since I do not see how to fix optional to work with the OutEdgeIterator (it looks like a compiler bug to me), I would like to ask the BGL authors if they could undo this recent change, or at least undo it for the IBM compiler so that the BGL compiles again? Or does anybody experienced with optional and the IBM compiler see how to patch optional to make it work with the IBM compiler? Best regards Matthias "boost/boost/optional/optional.hpp", line 353.66: 1540-0210 (S) "T" is not a base class of "out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned long>,long>". "boost/boost/optional/optional.hpp", line 353.10: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 327.11: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 208.24: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 130.7: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 436.5: 1540-0700 (I) The previous message was produced while processing "boost::optional<boost::detail::out_edge_iter<std::_Ptrit<boost:: detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned long>,long> >::~optional()". "test.C", line 8.1: 1540-0700 (I) The previous message was produced while processing "main()".

On Sep 11, 2004, at 3:09 AM, Matthias Troyer wrote:
A recent change to the file boost/graph/detail/adj_list_edge_iterator.hpp breaks the BGL on the IBM xlC compiler. The change is:
revision 1.7 date: 2004/08/24 22:00:33; author: dgregor; state: Exp; lines: +11 -10 Use boost::optional to avoid copying singular iterators
Ugh. I'll drop in the workaround. What's the #if or #ifdef to identify this compiler? Doug

On Sep 11, 2004, at 5:57 PM, Doug Gregor wrote:
On Sep 11, 2004, at 3:09 AM, Matthias Troyer wrote:
A recent change to the file boost/graph/detail/adj_list_edge_iterator.hpp breaks the BGL on the IBM xlC compiler. The change is:
revision 1.7 date: 2004/08/24 22:00:33; author: dgregor; state: Exp; lines: +11 -10 Use boost::optional to avoid copying singular iterators
Ugh. I'll drop in the workaround. What's the #if or #ifdef to identify this compiler?
#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) Matthias

A recent change to the file boost/graph/detail/adj_list_edge_iterator.hpp breaks the BGL on the IBM xlC compiler. The change is: revision 1.7 date: 2004/08/24 22:00:33; author: dgregor; state: Exp; lines: +11 -10 Use boost::optional to avoid copying singular iterators The problem is that on the IBM compiler unfortunately, for some strange reason the destructor of boost::optional fails to compile if the type is an OutEdgeIterator, as can be seen in the following program that fails: #include <boost/graph/adjacency_list.hpp> using namespace boost; int main() { typedef adjacency_list<vecS,vecS,directedS> G; typedef boost::graph_traits<G>::out_edge_iterator OutEdgeIterator; boost::optional<OutEdgeIterator> edges; } with the horrible error messages listed below. Since I do not see how to fix optional to work with the OutEdgeIterator (it looks like a compiler bug to me), I would like to ask the BGL authors if they could undo this recent change, or at least undo it for the IBM compiler so that the BGL compiles again? Or does anybody experienced with optional and the IBM compiler see how to patch optional to make it work with the IBM compiler? Best regards Matthias "boost/boost/optional/optional.hpp", line 353.66: 1540-0210 (S) "T" is not a base class of "out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned long>,long>". "boost/boost/optional/optional.hpp", line 353.10: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 327.11: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 208.24: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 130.7: 1540-0700 (I) The previous message was produced while processing "boost::optional_detail::optional_base<boost::detail:: out_edge_iter<std::_Ptrit<boost::detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned lon...". "boost/boost/optional/optional.hpp", line 436.5: 1540-0700 (I) The previous message was produced while processing "boost::optional<boost::detail::out_edge_iter<std::_Ptrit<boost:: detail::sep_<unsigned long,boost::no_property>,long,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &,boost::detail::sep_<unsigned long,boost::no_property> *,boost::detail::sep_<unsigned long,boost::no_property> &>,unsigned long,boost::detail::edge_desc_impl<boost::directed_tag,unsigned long>,long> >::~optional()". "test.C", line 8.1: 1540-0700 (I) The previous message was produced while processing "main()".
participants (3)
-
Doug Gregor
-
John Maddock
-
Matthias Troyer