|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69249 - trunk/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2011-02-24 15:56:49
Author: danieljames
Date: 2011-02-24 15:56:47 EST (Thu, 24 Feb 2011)
New Revision: 69249
URL: http://svn.boost.org/trac/boost/changeset/69249
Log:
Workaround for optimization bug in 64-bit g++ 4.4.
Text files modified:
trunk/tools/quickbook/src/actions.cpp | 2 ++
trunk/tools/quickbook/src/actions.hpp | 8 ++++++++
trunk/tools/quickbook/src/doc_info_grammar.cpp | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
Modified: trunk/tools/quickbook/src/actions.cpp
==============================================================================
--- trunk/tools/quickbook/src/actions.cpp (original)
+++ trunk/tools/quickbook/src/actions.cpp 2011-02-24 15:56:47 EST (Thu, 24 Feb 2011)
@@ -30,6 +30,8 @@
int qbk_minor_version = -1;
unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
+ void assign_qbk_version::operator()(int value) const { v_ = value; }
+
namespace {
std::string fully_qualified_id(std::string const& library_id,
std::string const& qualified_section_id,
Modified: trunk/tools/quickbook/src/actions.hpp
==============================================================================
--- trunk/tools/quickbook/src/actions.hpp (original)
+++ trunk/tools/quickbook/src/actions.hpp 2011-02-24 15:56:47 EST (Thu, 24 Feb 2011)
@@ -37,6 +37,14 @@
extern int qbk_major_version;
extern int qbk_minor_version;
extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
+
+ // This struct is used to avoid an optimization bug
+ // in g++ 4.4 on 64-bit linux.
+ struct assign_qbk_version {
+ assign_qbk_version(int& v) : v_(v) {}
+ void operator()(int value) const;
+ int& v_;
+ };
struct quickbook_range {
template <typename Arg>
Modified: trunk/tools/quickbook/src/doc_info_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/doc_info_grammar.cpp (original)
+++ trunk/tools/quickbook/src/doc_info_grammar.cpp 2011-02-24 15:56:47 EST (Thu, 24 Feb 2011)
@@ -80,9 +80,9 @@
local.quickbook_version =
"quickbook" >> hard_space
- >> ( cl::uint_p [cl::assign_a(qbk_major_version)]
+ >> ( cl::uint_p [assign_qbk_version(qbk_major_version)]
>> '.'
- >> uint2_t() [cl::assign_a(qbk_minor_version)]
+ >> uint2_t() [assign_qbk_version(qbk_minor_version)]
)
;
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