Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81273 - in trunk: boost/wave/util libs/wave
From: hartmut.kaiser_at_[hidden]
Date: 2012-11-09 20:20:19


Author: hkaiser
Date: 2012-11-09 20:20:19 EST (Fri, 09 Nov 2012)
New Revision: 81273
URL: http://svn.boost.org/trac/boost/changeset/81273

Log:
Wave: Fixed a problem with context<>::add_macro_definition which sometimes appended a superfluous T_EOF to the macro replacement list.
Text files modified:
   trunk/boost/wave/util/cpp_iterator.hpp | 9 +++++----
   trunk/libs/wave/ChangeLog | 31 +++++++++++++++++--------------
   2 files changed, 22 insertions(+), 18 deletions(-)

Modified: trunk/boost/wave/util/cpp_iterator.hpp
==============================================================================
--- trunk/boost/wave/util/cpp_iterator.hpp (original)
+++ trunk/boost/wave/util/cpp_iterator.hpp 2012-11-09 20:20:19 EST (Fri, 09 Nov 2012)
@@ -202,13 +202,14 @@
     boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(),
         BOOST_WAVE_MACRO_DEFINITION_ID, macrodefinition, act_pos, true);
 
+ // get rid of trailing T_EOF
+ if (!macrodefinition.empty() && token_id(macrodefinition.back()) == T_EOF)
+ macrodefinition.resize(macrodefinition.size()-1);
+
 // If no macrodefinition is given, and the macro string does not end with a
 // '=', then the macro should be defined with the value '1'
- if (0 == macrodefinition.size() &&
- '=' != macrostring[macrostring.size()-1])
- {
+ if (macrodefinition.empty() && '=' != macrostring[macrostring.size()-1])
         macrodefinition.push_back(token_type(T_INTLIT, "1", act_pos));
- }
 
 // add the new macro to the macromap
     return ctx.add_macro_definition(macroname, has_parameters, macroparameters,

Modified: trunk/libs/wave/ChangeLog
==============================================================================
--- trunk/libs/wave/ChangeLog (original)
+++ trunk/libs/wave/ChangeLog 2012-11-09 20:20:19 EST (Fri, 09 Nov 2012)
@@ -20,22 +20,25 @@
 
 CHANGELOG
 
-- Added util::create_directories() wrapper to account for new behavior of
- boost::filesystem::create_directories().
-- Fixed an obscure problem when preprocessing directives wouldn't be recognized
- if the previous line contained nothing but an empty macro invocation
- (see new test case t_9_023.cpp)
-- Added a new command line option --license=<file> to the Wave driver tool
- which allows to pre-pend the content of a (license) file to every newly
- created file. This option simplifies the implementation of partial
- preprocessing as done on Phoenix, Fusion, etc.
-- Changed the effect of the -N command line option to simply not expand
- the macro by pretending it was not defined. Earlier the whole invocation
- sequence was skipped, now we skip only the macro itself, which still expands
- the arguments for the macro invocation.
+Boost V1.53:
+ - Fixed a problem with context<>::add_macro_definition which sometimes
+ appended a superfluous T_EOF to the macro replacement list.
 
 Boost V1.52.0:
- - Fixed a couple of compilation warnings
+ - Added util::create_directories() wrapper to account for new behavior of
+ boost::filesystem::create_directories().
+ - Fixed an obscure problem when preprocessing directives wouldn't be recognized
+ if the previous line contained nothing but an empty macro invocation
+ (see new test case t_9_023.cpp)
+ - Added a new command line option --license=<file> to the Wave driver tool
+ which allows to pre-pend the content of a (license) file to every newly
+ created file. This option simplifies the implementation of partial
+ preprocessing as done on Phoenix, Fusion, etc.
+ - Changed the effect of the -N command line option to simply not expand
+ the macro by pretending it was not defined. Earlier the whole invocation
+ sequence was skipped, now we skip only the macro itself, which still expands
+ the arguments for the macro invocation.
+ - Fixed a couple of compilation warnings
 
 Boost V1.51.0
  - Fixed #7050: Invalid memory write bug in lexing_exception


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