Boost logo

Boost-Commit :

From: hartmut.kaiser_at_[hidden]
Date: 2007-12-02 12:18:55


Author: hkaiser
Date: 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
New Revision: 41588
URL: http://svn.boost.org/trac/boost/changeset/41588

Log:
Applied patch supplied by Jens Seidel. Fixed #1410.
Text files modified:
   trunk/boost/wave/cpp_iteration_context.hpp | 1 +
   trunk/boost/wave/cpplexer/cpp_lex_interface_generator.hpp | 1 +
   trunk/boost/wave/cpplexer/re2clex/cpp_re.hpp | 2 ++
   trunk/boost/wave/grammars/cpp_expression_value.hpp | 21 +++++++++++----------
   trunk/boost/wave/util/cpp_macromap_predef.hpp | 1 +
   trunk/boost/wave/util/cpp_macromap_utils.hpp | 3 +--
   trunk/boost/wave/util/insert_whitespace_detection.hpp | 12 ++++++------
   trunk/boost/wave/util/symbol_table.hpp | 2 ++
   trunk/boost/wave/util/time_conversion_helper.hpp | 1 +
   trunk/boost/wave/util/unput_queue_iterator.hpp | 10 +++-------
   trunk/boost/wave/wave_config.hpp | 3 ++-
   trunk/boost/wave/whitespace_handling.hpp | 1 +
   12 files changed, 32 insertions(+), 26 deletions(-)

Modified: trunk/boost/wave/cpp_iteration_context.hpp
==============================================================================
--- trunk/boost/wave/cpp_iteration_context.hpp (original)
+++ trunk/boost/wave/cpp_iteration_context.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -22,6 +22,7 @@
 #include <boost/wave/cpp_exceptions.hpp>
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/util/file_position.hpp>
+#include <boost/spirit/iterator/multi_pass.hpp> // make_multi_pass
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS

Modified: trunk/boost/wave/cpplexer/cpp_lex_interface_generator.hpp
==============================================================================
--- trunk/boost/wave/cpplexer/cpp_lex_interface_generator.hpp (original)
+++ trunk/boost/wave/cpplexer/cpp_lex_interface_generator.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -17,6 +17,7 @@
 #include <boost/wave/util/file_position.hpp>
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/cpplexer/cpp_lex_interface.hpp>
+#include <boost/wave/cpplexer/cpp_lex_token.hpp> // lex_token
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS

Modified: trunk/boost/wave/cpplexer/re2clex/cpp_re.hpp
==============================================================================
--- trunk/boost/wave/cpplexer/re2clex/cpp_re.hpp (original)
+++ trunk/boost/wave/cpplexer/re2clex/cpp_re.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -33,6 +33,8 @@
 namespace cpplexer {
 namespace re2clex {
 
+struct Scanner;
+
 ///////////////////////////////////////////////////////////////////////////////
 // The scanner function to call whenever a new token is requested
 BOOST_WAVE_DECL boost::wave::token_id scan(Scanner *s);

Modified: trunk/boost/wave/grammars/cpp_expression_value.hpp
==============================================================================
--- trunk/boost/wave/grammars/cpp_expression_value.hpp (original)
+++ trunk/boost/wave/grammars/cpp_expression_value.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -16,6 +16,7 @@
 #endif // defined(BOOST_SPIRIT_DEBUG)
 
 #include <boost/wave/wave_config.hpp>
+#include <boost/wave/grammars/cpp_value_error.hpp> // value_error
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS
@@ -185,8 +186,8 @@
             case is_bool:
                 {
                     int_literal_type result = value.i + as_long(rhs);
- if (rhs.value.i > 0L && value.i > result ||
- rhs.value.i < 0L && value.i < result)
+ if ((rhs.value.i > 0L && value.i > result) ||
+ (rhs.value.i < 0L && value.i < result))
                     {
                         valid = error_integer_overflow;
                     }
@@ -199,8 +200,8 @@
             case is_int:
                 {
                     int_literal_type result = value.i + rhs.value.i;
- if (rhs.value.i > 0L && value.i > result ||
- rhs.value.i < 0L && value.i < result)
+ if ((rhs.value.i > 0L && value.i > result) ||
+ (rhs.value.i < 0L && value.i < result))
                     {
                         valid = error_integer_overflow;
                     }
@@ -252,8 +253,8 @@
             case is_bool:
                 {
                     int_literal_type result = value.i - as_long(rhs);
- if (rhs.value.i > 0L && result > value.i ||
- rhs.value.i < 0L && result < value.i)
+ if ((rhs.value.i > 0L && result > value.i) ||
+ (rhs.value.i < 0L && result < value.i))
                     {
                         valid = error_integer_overflow;
                     }
@@ -266,8 +267,8 @@
             case is_int:
                 {
                     int_literal_type result = value.i - rhs.value.i;
- if (rhs.value.i > 0L && result > value.i ||
- rhs.value.i < 0L && result < value.i)
+ if ((rhs.value.i > 0L && result > value.i) ||
+ (rhs.value.i < 0L && result < value.i))
                     {
                         valid = error_integer_overflow;
                     }
@@ -310,8 +311,8 @@
             case is_int:
                 {
                     uint_literal_type result = value.ui - rhs.value.i;
- if (rhs.value.i > 0L && result > value.ui ||
- rhs.value.i < 0L && result < value.ui)
+ if ((rhs.value.i > 0L && result > value.ui) ||
+ (rhs.value.i < 0L && result < value.ui))
                     {
                         valid = error_integer_overflow;
                     }

Modified: trunk/boost/wave/util/cpp_macromap_predef.hpp
==============================================================================
--- trunk/boost/wave/util/cpp_macromap_predef.hpp (original)
+++ trunk/boost/wave/util/cpp_macromap_predef.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -19,6 +19,7 @@
 #include <boost/wave/wave_config.hpp>
 #include <boost/wave/wave_config_constant.hpp>
 #include <boost/wave/token_ids.hpp>
+#include <boost/wave/util/time_conversion_helper.hpp> // time_conversion_helper
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS

Modified: trunk/boost/wave/util/cpp_macromap_utils.hpp
==============================================================================
--- trunk/boost/wave/util/cpp_macromap_utils.hpp (original)
+++ trunk/boost/wave/util/cpp_macromap_utils.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -17,6 +17,7 @@
 
 #include <boost/wave/wave_config.hpp>
 #include <boost/wave/token_ids.hpp>
+#include <boost/wave/util/unput_queue_iterator.hpp>
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS
@@ -420,8 +421,6 @@
 inline bool
 is_whitespace_only (ContainerT const &argument)
 {
- using namespace cpplexer;
-
     typename ContainerT::const_iterator end = argument.end();
     for (typename ContainerT::const_iterator it = argument.begin();
           it != end; ++it)

Modified: trunk/boost/wave/util/insert_whitespace_detection.hpp
==============================================================================
--- trunk/boost/wave/util/insert_whitespace_detection.hpp (original)
+++ trunk/boost/wave/util/insert_whitespace_detection.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -84,7 +84,7 @@
     }
 // T_INTLIT
     inline bool
- handle_intlit(boost::wave::token_id prev, boost::wave::token_id before)
+ handle_intlit(boost::wave::token_id prev, boost::wave::token_id /*before*/)
     {
         using namespace boost::wave;
         switch (static_cast<unsigned int>(prev)) {
@@ -101,7 +101,7 @@
 // T_FLOATLIT
     inline bool
     handle_floatlit(boost::wave::token_id prev,
- boost::wave::token_id before)
+ boost::wave::token_id /*before*/)
     {
         using namespace boost::wave;
         switch (static_cast<unsigned int>(prev)) {
@@ -118,7 +118,7 @@
 // <% T_LEFTBRACE
     inline bool
     handle_alt_leftbrace(boost::wave::token_id prev,
- boost::wave::token_id before)
+ boost::wave::token_id /*before*/)
     {
         using namespace boost::wave;
         switch (static_cast<unsigned int>(prev)) {
@@ -131,7 +131,7 @@
 // <: T_LEFTBRACKET
     inline bool
     handle_alt_leftbracket(boost::wave::token_id prev,
- boost::wave::token_id before)
+ boost::wave::token_id /*before*/)
     {
         using namespace boost::wave;
         switch (static_cast<unsigned int>(prev)) {
@@ -144,7 +144,7 @@
 // T_FIXEDPOINTLIT
     inline bool
     handle_fixedpointlit(boost::wave::token_id prev,
- boost::wave::token_id before)
+ boost::wave::token_id /*before*/)
     {
         using namespace boost::wave;
         switch (static_cast<unsigned int>(prev)) {
@@ -174,7 +174,7 @@
 // T_QUESTION_MARK
     inline bool
     handle_questionmark(boost::wave::token_id prev,
- boost::wave::token_id before)
+ boost::wave::token_id /*before*/)
     {
         using namespace boost::wave;
         switch(static_cast<unsigned int>(prev)) {

Modified: trunk/boost/wave/util/symbol_table.hpp
==============================================================================
--- trunk/boost/wave/util/symbol_table.hpp (original)
+++ trunk/boost/wave/util/symbol_table.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -14,6 +14,8 @@
 #include <map>
 
 #include <boost/wave/wave_config.hpp>
+#include <boost/shared_ptr.hpp>
+
 #if BOOST_WAVE_SERIALIZATION != 0
 #include <boost/serialization/serialization.hpp>
 #include <boost/serialization/map.hpp>

Modified: trunk/boost/wave/util/time_conversion_helper.hpp
==============================================================================
--- trunk/boost/wave/util/time_conversion_helper.hpp (original)
+++ trunk/boost/wave/util/time_conversion_helper.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -12,6 +12,7 @@
 #define TIME_CONVERSION_HELPER_HPP_DA97E389_1797_43BA_82AE_B071064B3EF4_INCLUDED
 
 #include <ctime>
+#include <cstring>
 
 #include <boost/config.hpp>
 #include <boost/spirit/core.hpp>

Modified: trunk/boost/wave/util/unput_queue_iterator.hpp
==============================================================================
--- trunk/boost/wave/util/unput_queue_iterator.hpp (original)
+++ trunk/boost/wave/util/unput_queue_iterator.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -18,6 +18,7 @@
 #include <boost/iterator_adaptors.hpp>
 
 #include <boost/wave/wave_config.hpp>
+#include <boost/wave/token_ids.hpp> // token_id
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS
@@ -416,10 +417,7 @@
     inline boost::wave::token_id
     skip_whitespace(IteratorT &first, IteratorT const &last)
     {
- using namespace cpplexer;
-
- token_id id = next_token<IteratorT>::peek(first, last, false);
-
+ token_id id = next_token<IteratorT>::peek(first, last, false);
         if (IS_CATEGORY(id, WhiteSpaceTokenType)) {
             do {
                 ++first;
@@ -434,11 +432,9 @@
     inline boost::wave::token_id
     skip_whitespace(IteratorT &first, IteratorT const &last, ContainerT &queue)
     {
- using namespace cpplexer;
         queue.push_back (*first); // queue up the current token
         
- token_id id = next_token<IteratorT>::peek(first, last, false);
-
+ token_id id = next_token<IteratorT>::peek(first, last, false);
         if (IS_CATEGORY(id, WhiteSpaceTokenType)) {
             do {
                 queue.push_back(*++first); // queue up the next whitespace

Modified: trunk/boost/wave/wave_config.hpp
==============================================================================
--- trunk/boost/wave/wave_config.hpp (original)
+++ trunk/boost/wave/wave_config.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -347,7 +347,7 @@
 // import as a keyword (T_IMPORT token id)
 //
 #if !defined(BOOST_WAVE_SUPPORT_IMPORT_KEYWORD)
-#define BOOST_WAVE_SUPPORT_IMPORT_KEYWORD 0
+#define BOOST_WAVE_SUPPORT_IMPORT_KEYWORD 0
 #endif
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -404,6 +404,7 @@
 #define PHOENIX_LIMIT 6
 #endif
 #if PHOENIX_LIMIT < 6
+// boost/spirit/attribute.hpp sets PHOENIX_LIMIT to 3!
 #error "Boost.Wave: the constant PHOENIX_LIMIT must be at least defined to 4" \
        " to compile the library."
 #endif

Modified: trunk/boost/wave/whitespace_handling.hpp
==============================================================================
--- trunk/boost/wave/whitespace_handling.hpp (original)
+++ trunk/boost/wave/whitespace_handling.hpp 2007-12-02 12:18:54 EST (Sun, 02 Dec 2007)
@@ -16,6 +16,7 @@
 #include <boost/wave/wave_config.hpp>
 #include <boost/wave/token_ids.hpp>
 #include <boost/wave/preprocessing_hooks.hpp>
+#include <boost/wave/language_support.hpp>
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS


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