Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#2432 closed Bugs (fixed)

spirit/home/classic/utility/impl/chset/basic_chset.hpp misses include <limits.h>

Reported by: joerg.richter@… Owned by: Joel de Guzman
Milestone: Boost 1.37.0 Component: spirit
Version: Boost 1.36.0 Severity: Problem
Keywords: Cc:

Description

spirit/home/classic/utility/impl/chset/basic_chset.hpp uses the macro CHAR_BIT without including <limits.h>

Our scenario is, that two objects use chset<char> and one object has included <limits.h> and another one hasn't. This results in an ODR violation for basic_chset<char>.

This happens with GCC-4.3.2. If boost were clean enough to use '-Wundef', to warn on undefined macros, this bug would have be found much earlier.

Change History (4)

comment:1 by Richard Webb <richard.webb@…>, 13 years ago

The current version of basic_chset.hpp includes <climits> (which includes limits.h). Problem fixed?

comment:2 by Steven Watanabe, 13 years ago

It was fixed in classic spirit in [49708] and merged to release in [50611], but Spirit 2 has the same problem.

It [source:/trunk/boost/spirit/home/qi/char/detail/basic_chset.hpp@52603#L133 uses CHAR_BIT] but [source:/trunk/boost/spirit/home/qi/char/detail/basic_chset.hpp@52603#L16 doesn't #include <climits>]

comment:3 by Hartmut Kaiser, 13 years ago

Resolution: fixed
Status: newclosed

(In [53558]) Spirit: fix #2432

comment:4 by Hartmut Kaiser, 13 years ago

(In [53559]) Spirit: fix #2432

Note: See TracTickets for help on using tickets.