Boost C++ Libraries: Ticket #613: boost/crc.hpp uses non-standard conforming syntax https://svn.boost.org/trac10/ticket/613 <pre class="wiki">[ellert@ellert ~]$ g++ -pedantic -x c++ /usr/include/boost/crc.hpp /usr/include/boost/crc.hpp:464: error: ISO C++ forbids variable-size array `table_type' [ellert@ellert ~]$ g++ --version g++ (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The header file uses a non-constant expression as the size in an array declaration. This is not valid c++, and the compiler rejects it when using the -pedantic flag. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/613 Trac 1.4.3 mattiasellert Fri, 28 Apr 2006 14:48:28 GMT summary changed https://svn.boost.org/trac10/ticket/613#comment:1 https://svn.boost.org/trac10/ticket/613#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost/crc.hpp used non-standard conforming syntax</span> → <span class="trac-field-new">boost/crc.hpp uses non-standard conforming syntax</span> </li> </ul> Ticket mattiasellert Fri, 28 Apr 2006 15:44:41 GMT <link>https://svn.boost.org/trac10/ticket/613#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/613#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=1009278 The expression used as array size is declared BOOST_STATIC_CONSTANT, so it should be permissable. Checking various compiler versions... gcc 3.4.4, 3.4.5 and 4.0.0 fails. gcc 4.0.2 works. If I change the offending line from: typedef value_type table_type[ byte_combos ]; to: typedef value_type table_type[ 1ul &lt;&lt; CHAR_BIT ]; it works on all these 4 versions of the compiler. Since byte_combos is declared as BOOST_STATIC_CONSTANT( std::size_t, byte_combos = (1ul &lt;&lt; CHAR_BIT) ); this should be the same. Looks like a compiler bug. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Daryle Walker</dc:creator> <pubDate>Fri, 03 Aug 2007 10:41:51 GMT</pubDate> <title>component changed; severity set https://svn.boost.org/trac10/ticket/613#comment:3 https://svn.boost.org/trac10/ticket/613#comment:3 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">crc</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket Steven Watanabe Fri, 05 Jun 2009 00:42:48 GMT status, resolution changed https://svn.boost.org/trac10/ticket/613#comment:4 https://svn.boost.org/trac10/ticket/613#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53646" title="Workaround gcc problems with -pedantic. Fixes #613">[53646]</a>) Workaround gcc problems with -pedantic. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/613" title="#613: Bugs: boost/crc.hpp uses non-standard conforming syntax (closed: fixed)">#613</a> </p> Ticket