|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79689 - in branches/release: . boost boost/wave boost/wave/cpplexer boost/wave/cpplexer/re2clex boost/wave/util libs libs/wave libs/wave/test/testwave libs/wave/test/testwave/testfiles tools tools/wave
From: hartmut.kaiser_at_[hidden]
Date: 2012-07-22 20:21:53
Author: hkaiser
Date: 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
New Revision: 79689
URL: http://svn.boost.org/trac/boost/changeset/79689
Log:
Wave: merging from trunk
Added:
branches/release/libs/wave/test/testwave/testfiles/t_9_021.cpp
- copied unchanged from r79685, /trunk/libs/wave/test/testwave/testfiles/t_9_021.cpp
branches/release/libs/wave/test/testwave/testfiles/t_9_022.cpp
- copied unchanged from r79685, /trunk/libs/wave/test/testwave/testfiles/t_9_022.cpp
Properties modified:
branches/release/ (props changed)
branches/release/boost/ (props changed)
branches/release/boost/wave/ (props changed)
branches/release/libs/ (props changed)
branches/release/libs/wave/ (props changed)
branches/release/tools/ (props changed)
branches/release/tools/wave/ (props changed)
Text files modified:
branches/release/boost/wave/cpp_exceptions.hpp | 2 +-
branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp | 2 +-
branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp | 2 +-
branches/release/boost/wave/cpplexer/re2clex/scanner.hpp | 2 +-
branches/release/boost/wave/language_support.hpp | 37 +++++++++++++++++++------------------
branches/release/boost/wave/token_ids.hpp | 2 +-
branches/release/boost/wave/util/cpp_iterator.hpp | 17 +++++++++++++----
branches/release/boost/wave/util/cpp_macromap.hpp | 4 ++--
branches/release/boost/wave/util/cpp_macromap_predef.hpp | 2 +-
branches/release/boost/wave/wave_config.hpp | 4 ++--
branches/release/boost/wave/whitespace_handling.hpp | 2 +-
branches/release/libs/wave/ChangeLog | 5 +++++
branches/release/libs/wave/test/testwave/testfiles/t_7_001.cpp | 2 +-
branches/release/libs/wave/test/testwave/testfiles/test.cfg | 2 ++
branches/release/libs/wave/test/testwave/testwave_app.cpp | 6 +++---
branches/release/tools/wave/cpp.cpp | 10 +++++-----
16 files changed, 59 insertions(+), 42 deletions(-)
Modified: branches/release/boost/wave/cpp_exceptions.hpp
==============================================================================
--- branches/release/boost/wave/cpp_exceptions.hpp (original)
+++ branches/release/boost/wave/cpp_exceptions.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -283,7 +283,7 @@
"a macro or scope name", // alreadydefined_name
"undefined macro or scope name may not be imported", // undefined_macroname
"ill formed macro name", // invalid_macroname
- "qualified names are supported in C++0x mode only", // unexpected_qualified_name
+ "qualified names are supported in C++11 mode only", // unexpected_qualified_name
"division by zero in preprocessor expression", // division_by_zero
"integer overflow in preprocessor expression", // integer_overflow
"this cannot be used as a macro name as it is "
Modified: branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp
==============================================================================
--- branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp (original)
+++ branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -133,7 +133,7 @@
// a third parameter containing the name of the parsed input file
// and a 4th parameter of the type boost::wave::language_support
// which specifies, which language subset should be supported (C++,
-// C99, C++0x etc.).
+// C99, C++11 etc.).
//
///////////////////////////////////////////////////////////////////////////////
Modified: branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp
==============================================================================
--- branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp (original)
+++ branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -219,7 +219,7 @@
}
#endif
- case T_LONGINTLIT: // supported in C++0x, C99 and long_long mode
+ case T_LONGINTLIT: // supported in C++11, C99 and long_long mode
value = string_type((char const *)scanner.tok,
scanner.cur-scanner.tok);
if (!boost::wave::need_long_long(language)) {
Modified: branches/release/boost/wave/cpplexer/re2clex/scanner.hpp
==============================================================================
--- branches/release/boost/wave/cpplexer/re2clex/scanner.hpp (original)
+++ branches/release/boost/wave/cpplexer/re2clex/scanner.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -57,7 +57,7 @@
bool detect_pp_numbers; /* lexer should prefer to detect pp-numbers */
bool enable_import_keyword; /* recognize import as a keyword */
bool single_line_only; /* don't report missing eol's in C++ comments */
- bool act_in_cpp0x_mode; /* lexer works in C++0x mode */
+ bool act_in_cpp0x_mode; /* lexer works in C++11 mode */
} Scanner;
///////////////////////////////////////////////////////////////////////////////
Modified: branches/release/boost/wave/language_support.hpp
==============================================================================
--- branches/release/boost/wave/language_support.hpp (original)
+++ branches/release/boost/wave/language_support.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -1,7 +1,7 @@
/*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
Definition of the various language support constants
-
+
http://www.boost.org/
Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
@@ -33,9 +33,10 @@
// support flags for C99
support_option_variadics = 0x04,
support_c99 = support_option_variadics | support_option_long_long | 0x08,
-#endif
+#endif
#if BOOST_WAVE_SUPPORT_CPP0X != 0
support_cpp0x = support_option_variadics | support_option_long_long | 0x10,
+ support_cpp11 = support_cpp0x,
#endif
support_option_mask = 0xFFB0,
@@ -52,29 +53,29 @@
};
///////////////////////////////////////////////////////////////////////////////
-//
+//
// need_cpp
//
// Extract, if the language to support is C++98
//
///////////////////////////////////////////////////////////////////////////////
inline bool
-need_cpp(language_support language)
+need_cpp(language_support language)
{
return (language & ~support_option_mask) == support_cpp;
}
///////////////////////////////////////////////////////////////////////////////
-//
+//
// need_cpp0x
//
-// Extract, if the language to support is C++0x
+// Extract, if the language to support is C++11
//
///////////////////////////////////////////////////////////////////////////////
#if BOOST_WAVE_SUPPORT_CPP0X != 0
inline bool
-need_cpp0x(language_support language)
+need_cpp0x(language_support language)
{
return (language & ~support_option_mask) == support_cpp0x;
}
@@ -82,7 +83,7 @@
#else
inline bool
-need_cpp0x(language_support language)
+need_cpp0x(language_support language)
{
return false;
}
@@ -91,14 +92,14 @@
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
///////////////////////////////////////////////////////////////////////////////
-//
+//
// need_c99
//
// Extract, if the language to support is C99
//
///////////////////////////////////////////////////////////////////////////////
inline bool
-need_c99(language_support language)
+need_c99(language_support language)
{
return (language & ~support_option_mask) == support_c99;
}
@@ -106,8 +107,8 @@
#else // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
///////////////////////////////////////////////////////////////////////////////
-inline bool
-need_variadics(language_support language)
+inline bool
+need_variadics(language_support language)
{
return false;
}
@@ -121,7 +122,7 @@
//////////////////////////////////////////////////////////////////////////////
inline bool
-need_c99(language_support language)
+need_c99(language_support language)
{
return false;
}
@@ -129,7 +130,7 @@
#endif // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
///////////////////////////////////////////////////////////////////////////////
-//
+//
// get_support_options
//
// Set preserve comments support in the language to support
@@ -142,7 +143,7 @@
}
///////////////////////////////////////////////////////////////////////////////
-//
+//
// set_support_options
//
// Set language option (for fine tuning of lexer behavior)
@@ -178,7 +179,7 @@
BOOST_WAVE_NEED_OPTION(option) \
BOOST_WAVE_ENABLE_OPTION(option) \
/**/
-
+
///////////////////////////////////////////////////////////////////////////////
BOOST_WAVE_OPTION(long_long) // support_option_long_long
BOOST_WAVE_OPTION(no_character_validation) // support_option_no_character_validation
@@ -192,7 +193,7 @@
#endif
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
BOOST_WAVE_OPTION(variadics) // support_option_variadics
-#endif
+#endif
#if BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES != 0
BOOST_WAVE_OPTION(emit_pragma_directives) // support_option_emit_pragma_directives
#endif
@@ -205,7 +206,7 @@
///////////////////////////////////////////////////////////////////////////////
} // namespace wave
-} // namespace boost
+} // namespace boost
// the suffix header occurs after all of the code
#ifdef BOOST_HAS_ABI_HEADERS
Modified: branches/release/boost/wave/token_ids.hpp
==============================================================================
--- branches/release/boost/wave/token_ids.hpp (original)
+++ branches/release/boost/wave/token_ids.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -287,7 +287,7 @@
// import is needed to be a keyword for the C++ module Standards proposal
T_IMPORT = TOKEN_FROM_ID(421, KeywordTokenType),
-// C++0x keywords
+// C++11 keywords
T_ALIGNAS = TOKEN_FROM_ID(422, KeywordTokenType),
T_ALIGNOF = TOKEN_FROM_ID(423, KeywordTokenType),
T_CHAR16_T = TOKEN_FROM_ID(424, KeywordTokenType),
Modified: branches/release/boost/wave/util/cpp_iterator.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_iterator.hpp (original)
+++ branches/release/boost/wave/util/cpp_iterator.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -466,7 +466,8 @@
template <typename ContextT>
bool consider_emitting_line_directive(ContextT const& ctx, token_id id)
{
- if (need_preserve_comments(ctx.get_language())) {
+ if (need_preserve_comments(ctx.get_language()))
+ {
if (!IS_CATEGORY(id, EOLTokenType) && !IS_CATEGORY(id, EOFTokenType))
{
return true;
@@ -475,7 +476,7 @@
if (!IS_CATEGORY(id, WhiteSpaceTokenType) &&
!IS_CATEGORY(id, EOLTokenType) && !IS_CATEGORY(id, EOFTokenType))
{
- return true;
+ return true;
}
return false;
}
@@ -492,13 +493,17 @@
// loop over skip able whitespace until something significant is found
bool was_seen_newline = seen_newline;
+ bool was_skipped_newline = skipped_newline;
token_id id = T_UNKNOWN;
try { // catch lexer exceptions
do {
+ if (skipped_newline) {
+ was_skipped_newline = true;
+ skipped_newline = false;
+ }
+
// get_next_token assigns result to act_token member
- if (skipped_newline)
- seen_newline = true;
get_next_token();
// if comments shouldn't be preserved replace them with newlines
@@ -518,6 +523,10 @@
return act_token;
}
+// restore the accumulated skipped_newline state for next invocation
+ if (was_skipped_newline)
+ skipped_newline = true;
+
// if there were skipped any newlines, we must emit a #line directive
if ((must_emit_line_directive || (was_seen_newline && skipped_newline)) &&
impl::consider_emitting_line_directive(ctx, id))
Modified: branches/release/boost/wave/util/cpp_macromap.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_macromap.hpp (original)
+++ branches/release/boost/wave/util/cpp_macromap.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -1641,7 +1641,7 @@
for (/**/; it != end && T_EOF != token_id(*it); ++it)
{
// as of Wave V2.0.7 pasting of tokens is valid only if the resulting
- // tokens are pp_tokens (as mandated by C++0x)
+ // tokens are pp_tokens (as mandated by C++11)
if (!is_pp_token(*it))
return false;
rescanned.push_back(*it);
@@ -1847,7 +1847,7 @@
{
#if BOOST_WAVE_SUPPORT_CPP0X != 0
if (boost::wave::need_cpp0x(ctx.get_language())) {
- // define C++0x specifics
+ // define C++11 specifics
for (int i = 0; 0 != predef.static_data_cpp0x(i).name; ++i) {
predefined_macros::static_macros const& m = predef.static_data_cpp0x(i);
predefine_macro(current_scope, m.name,
Modified: branches/release/boost/wave/util/cpp_macromap_predef.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_macromap_predef.hpp (original)
+++ branches/release/boost/wave/util/cpp_macromap_predef.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -224,7 +224,7 @@
}
#if BOOST_WAVE_SUPPORT_CPP0X != 0
- // C++0x mode
+ // C++11 mode
static_macros const& static_data_cpp0x(std::size_t i) const
{
static static_macros data[] = {
Modified: branches/release/boost/wave/wave_config.hpp
==============================================================================
--- branches/release/boost/wave/wave_config.hpp (original)
+++ branches/release/boost/wave/wave_config.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -83,9 +83,9 @@
#endif
///////////////////////////////////////////////////////////////////////////////
-// Decide, whether to support C++0x
+// Decide, whether to support C++11
//
-// To implement C++0x keywords and preprocessor semantics define the following
+// To implement C++11 keywords and preprocessor semantics define the following
// to something not equal to zero.
//
#if !defined(BOOST_WAVE_SUPPORT_CPP0X)
Modified: branches/release/boost/wave/whitespace_handling.hpp
==============================================================================
--- branches/release/boost/wave/whitespace_handling.hpp (original)
+++ branches/release/boost/wave/whitespace_handling.hpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -67,7 +67,7 @@
#if BOOST_WAVE_SUPPORT_CPP0X != 0
///////////////////////////////////////////////////////////////////////////
- // This function returns the number of newlines in the given C++0x style
+ // This function returns the number of newlines in the given C++11 style
// raw string
template <typename TokenT>
int rawstring_count_newlines(TokenT const& token)
Modified: branches/release/libs/wave/ChangeLog
==============================================================================
--- branches/release/libs/wave/ChangeLog (original)
+++ branches/release/libs/wave/ChangeLog 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -20,6 +20,11 @@
CHANGELOG
+Boost V1.51.0
+ - Fixed #7050: Invalid memory write bug in lexing_exception
+ - Fixed #7159: Text-lines are processed as if they were preprocessing directives
+ - Changed --c++0x command line option to --c++11.
+
Boost V1.50.0
- V2.3.2
- Fixed #6758: not all members are initialized by base_iteration_context
Modified: branches/release/libs/wave/test/testwave/testfiles/t_7_001.cpp
==============================================================================
--- branches/release/libs/wave/test/testwave/testfiles/t_7_001.cpp (original)
+++ branches/release/libs/wave/test/testwave/testfiles/t_7_001.cpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -7,7 +7,7 @@
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
-//O --c++0x
+//O --c++11
//R #line 16 "t_7_001.cpp"
//R R"de
Modified: branches/release/libs/wave/test/testwave/testfiles/test.cfg
==============================================================================
--- branches/release/libs/wave/test/testwave/testfiles/test.cfg (original)
+++ branches/release/libs/wave/test/testwave/testfiles/test.cfg 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -236,3 +236,5 @@
t_9_018.cpp
t_9_019.cpp
t_9_020.cpp
+t_9_021.cpp
+t_9_022.cpp
Modified: branches/release/libs/wave/test/testwave/testwave_app.cpp
==============================================================================
--- branches/release/libs/wave/test/testwave/testwave_app.cpp (original)
+++ branches/release/libs/wave/test/testwave/testwave_app.cpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -371,7 +371,7 @@
#endif
("skipped_token_hooks", "record skipped_token hook calls")
#if BOOST_WAVE_SUPPORT_CPP0X != 0
- ("c++0x", "enable C99 mode (implies --variadics and --long_long)")
+ ("c++11", "enable C++11 mode (implies --variadics and --long_long)")
#endif
;
}
@@ -914,9 +914,9 @@
#endif // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
#if BOOST_WAVE_SUPPORT_CPP0X
- if (vm.count("c++0x")) {
+ if (vm.count("c++11")) {
if (9 == debuglevel) {
- std::cerr << "initialise_options: option: c++0x" << std::endl;
+ std::cerr << "initialise_options: option: c++11" << std::endl;
}
ctx.set_language(
boost::wave::language_support(
Modified: branches/release/tools/wave/cpp.cpp
==============================================================================
--- branches/release/tools/wave/cpp.cpp (original)
+++ branches/release/tools/wave/cpp.cpp 2012-07-22 20:21:37 EDT (Sun, 22 Jul 2012)
@@ -808,9 +808,9 @@
// enable C99 mode, if appropriate (implies variadics)
if (vm.count("c99")) {
#if BOOST_WAVE_SUPPORT_CPP0X != 0
- if (vm.count("c++0x")) {
+ if (vm.count("c++11")) {
cerr << "wave: multiple language options specified: --c99 "
- "and --c++0x" << endl;
+ "and --c++11" << endl;
return -1;
}
#endif
@@ -834,10 +834,10 @@
}
#endif // BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
#if BOOST_WAVE_SUPPORT_CPP0X != 0
- if (vm.count("c++0x")) {
+ if (vm.count("c++11")) {
if (vm.count("c99")) {
cerr << "wave: multiple language options specified: --c99 "
- "and --c++0x" << endl;
+ "and --c++11" << endl;
return -1;
}
ctx.set_language(
@@ -1271,7 +1271,7 @@
("c99", "enable C99 mode (implies --variadics)")
#endif
#if BOOST_WAVE_SUPPORT_CPP0X != 0
- ("c++0x", "enable C++0x mode (implies --variadics and --long_long)")
+ ("c++11", "enable C++11 mode (implies --variadics and --long_long)")
#endif
("listincludes,l", po::value<std::string>(),
"list names of included files to a file [arg] or to stdout [-]")
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