Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53646 - trunk/boost
From: steven_at_[hidden]
Date: 2009-06-04 20:42:45


Author: steven_watanabe
Date: 2009-06-04 20:42:44 EDT (Thu, 04 Jun 2009)
New Revision: 53646
URL: http://svn.boost.org/trac/boost/changeset/53646

Log:
Workaround gcc problems with -pedantic. Fixes #613
Text files modified:
   trunk/boost/crc.hpp | 4 ++++
   1 files changed, 4 insertions(+), 0 deletions(-)

Modified: trunk/boost/crc.hpp
==============================================================================
--- trunk/boost/crc.hpp (original)
+++ trunk/boost/crc.hpp 2009-06-04 20:42:44 EDT (Thu, 04 Jun 2009)
@@ -464,6 +464,10 @@
         // 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 ];
+#elif defined(__GNUC__)
+ // old versions of GCC (before 4.0.2) choke on using byte_combos
+ // as a constant expression when compiling with -pedantic.
+ typedef value_type table_type[1ul << CHAR_BIT];
 #else
         typedef value_type table_type[ byte_combos ];
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk