Boost logo

Boost Users :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-12-14 19:35:59


On 12/8/04 2:07 PM, "Kathryn Hogg" <kjh_at_[hidden]> wrote:

> including boost/crc.hpp when compiling with g++ 3.4.2 yields the following
> compiler error:
>
> /users/kjh/src/toolkits/boost/crc.hpp:464: error: ISO C++ forbids
> variable-size array `table_type'
>
> And the code in question is
>
> #if defined(__BORLANDC__) && defined(_M_IX86) && (__BORLANDC__ == 0x560)
> // for some reason Borland's command line compiler (version 0x560)
> // chokes over this unless we do the calculation for it:
> typedef value_type table_type[ 0x100 ];
> #else
> typedef value_type table_type[ byte_combos ];
> #endif
>
> Apparantly some version of g++ need to be included in the #if test as well.
> Pretty trivial to do but I thought I'd post here so the maintainers of the
> crc library can get it officially fixed.

It works on my GCC (Apple's special GCC 3.3). See if anyone else has the
same problem. If so, maybe you can figure out what range of GCC compilers
have the problem so we can add another preprocessor case.

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net