Boost logo

Boost :

From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2004-02-01 18:21:19


--- "Ralf W. Grosse-Kunstleve" <rwgk_at_[hidden]> wrote:
> I will submit a gcc bug report later today. However, it is not a given that
> the
> gcc people will fix the ICE before their release. Therefore I'd like to find
> out if a simple rearrangement of the boost code is sufficient to work around
> the gcc ICE. This approach has worked many times in the past. I'll try to
> work
> on this later today.

The trivial patches below do the trick. I think it would be good to apply them
to the RC_1_31_0 branch. It would be a pitty if Boost 1.31.0 did not work with
the next gcc release.

I'll go ahead and use the boost CVS HEAD to submit a gcc bug report.

Ralf

Index: minus.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpl/minus.hpp,v
retrieving revision 1.1
diff -u -r1.1 minus.hpp
--- minus.hpp 25 Feb 2003 23:10:44 -0000 1.1
+++ minus.hpp 1 Feb 2004 23:13:44 -0000
@@ -34,7 +34,8 @@
 struct minus_c
 {
     BOOST_STATIC_CONSTANT(T, value = (N1 - N2 - N3 - N4 - N5));
-#if !defined(__BORLANDC__)
+#if !defined(__BORLANDC__) \
+ && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 4 &&
__GNUC_PATCHLEVEL__ == 0)
     typedef integral_c<T,value> type;
 #else
     typedef integral_c<T,(N1 - N2 - N3 - N4 - N5)> type;
Index: negate.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpl/negate.hpp,v
retrieving revision 1.1
diff -u -r1.1 negate.hpp
--- negate.hpp 25 Feb 2003 23:10:45 -0000 1.1
+++ negate.hpp 1 Feb 2004 23:13:44 -0000
@@ -34,7 +34,8 @@
 {
     typedef BOOST_MPL_AUX_TYPEOF(T,T::value) value_type;
     BOOST_STATIC_CONSTANT(value_type, value = (-T::value));
-#if !defined(__BORLANDC__)
+#if !defined(__BORLANDC__) \
+ && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 4 &&
__GNUC_PATCHLEVEL__ == 0)
     typedef integral_c<value_type, value> type;
 #else
     typedef integral_c<value_type, (-T::value)> type;
Index: plus.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/mpl/plus.hpp,v
retrieving revision 1.2
diff -u -r1.2 plus.hpp
--- plus.hpp 20 May 2003 18:55:44 -0000 1.2
+++ plus.hpp 1 Feb 2004 23:13:44 -0000
@@ -34,7 +34,8 @@
 struct plus_c
 {
     BOOST_STATIC_CONSTANT(T, value = (N1 + N2 + N3 + N4 + N5));
-#if !defined(__BORLANDC__)
+#if !defined(__BORLANDC__) \
+ && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 4 &&
__GNUC_PATCHLEVEL__ == 0)
     typedef integral_c<T,value> type;
 #else
     typedef integral_c<T,(N1 + N2 + N3 + N4 + N5)> type;

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk