Boost logo

Boost Testing :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-02-25 21:18:32


Daniel James wrote:
> On Thu, 22 Feb 2007 18:13:58 -0000, Eric Niebler
> <eric_at_[hidden]> wrote:
>
>> There are two testers running with intel-linux-9.0. The foreach tests
>> pass on one, and fail on the other. How is that possible? If these are
>> different compilers, their toolsets should have different names. As it
>> is, I don't even know how to mark up this failure.
>
> It's the version of gcc they're using with intel linux. The test passes
> for gcc-3.3, fails for gcc-3.4, gcc-4.0 and gcc-4.1. So the names could be
> changed to something like intel-linux-9.0-gcc-3.3 and
> intel-linux-9.0-gcc-3.4. You can see the version details in
> http://tinyurl.com/2a45wj and http://tinyurl.com/323fb6

Interesting! I'm not familiar with the intel compiler on linux. In what
way does it make use of gcc? No matter, I think I can guess what the
problem is from the tests you ran. Can you apply the attached patch to
boost/foreach.hpp and re-run your tests?

Thanks for the tremendous help!

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Index: foreach.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/foreach.hpp,v
retrieving revision 1.35
diff -b -d -u -r1.35 foreach.hpp
--- foreach.hpp 10 Jan 2007 23:30:15 -0000 1.35
+++ foreach.hpp 26 Feb 2007 02:16:12 -0000
@@ -29,8 +29,8 @@
 
 // Some compilers let us detect even const-qualified rvalues at compile-time
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) \
- || BOOST_WORKAROUND(__GNUC__, >= 4) \
- || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4))
+ || (BOOST_WORKAROUND(__GNUC__, >= 4) && !defined(BOOST_INTEL)) \
+ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL))
 # define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION
 #else
 // Some compilers allow temporaries to be bound to non-const references.


Boost-testing list run by mbergal at meta-comm.com