Re: beast-0.7.4 issues with g++-4.5



On Tue, 19 Apr 2011, Stefan Westerfeld wrote:

On Sat, Apr 09, 2011 at 09:09:23PM +0200, Stefan Westerfeld wrote:

CXX    birnetutils.lo
birnetutils.cc:253:111: error: array bound is not an integer constant before ']' token
birnetutils.cc:254:111: error: array bound is not an integer constant before ']' token
birnetutils.cc:255:109: error: array bound is not an integer constant before ']' token

I investigated the issue a little further. First of all, I tried using BOOST_STATIC_ASSERT
instead of BIRNET_STATIC_ASSERT, just to see if our static assertion facility needs to
be fixed. However, BOOST_STATIC_ASSERT behaves the same way like BIRNET_STATIC_ASSERT:
it fails on those expressions involving DBL_MIN/DBL_MAX/DBL_EPSILON on g++-4.5, and
succeeds with g++-4.4. There are IMHO several ways to fix compilation with g++-4.5.

4) Move assertions to runtime checks at startup. For instance with global
constructors, we could keep the test in the same file, but the constructor
would do the assertions and prevent starting BEAST if the test does not work.

5) We could disable these static assertions altogether (or conditionally for
g++ >= 4.5.0) , but I think thats not such a good option, as they were designed
to prevent problems down the road, so I'm not considering this at the moment.

As there are multiple approaches on how to fix the issue, I'd like some
guidance here as on which approach to take. I can make a patch/merge request
for approach 2, 3 or 4, as soon as the decision on which route to take is made.

I'd favor something similar to the effect of 4, but I really think the compiler
needs fixing here. I.e. we should just hold the horses here and see how the GCC/Boost
teams are sorting it out. Both have more resources and a wider user base than Beast,
so being patient will just provide a solution automatically.
Until then, only GCC-4.4 is supported by Beast/Rapicorn, which is fine.

  Cu... Stefan

Yours sincerely,
Tim Janik

---
http://lanedo.com/~timj/ - Founder and CEO of Lanedo GmbH.
Free software author and contributor on various projects.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]