#2432 closed Bugs (fixed)
spirit/home/classic/utility/impl/chset/basic_chset.hpp misses include <limits.h>
Reported by: | 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 , 13 years ago
comment:2 by , 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>]
The current version of basic_chset.hpp includes <climits> (which includes limits.h). Problem fixed?