Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69470 - in branches/release/tools/quickbook: . doc src test
From: dnljms_at_[hidden]
Date: 2011-03-02 03:51:23


Author: danieljames
Date: 2011-03-02 03:51:20 EST (Wed, 02 Mar 2011)
New Revision: 69470
URL: http://svn.boost.org/trac/boost/changeset/69470

Log:
Merge quickbook workaround for g++ 4.4 optimization bug.

Properties modified:
   branches/release/tools/quickbook/ (props changed)
   branches/release/tools/quickbook/doc/ (props changed)
   branches/release/tools/quickbook/src/ (props changed)
   branches/release/tools/quickbook/test/ (props changed)
Text files modified:
   branches/release/tools/quickbook/src/actions.cpp | 2 ++
   branches/release/tools/quickbook/src/actions.hpp | 8 ++++++++
   branches/release/tools/quickbook/src/doc_info_grammar.cpp | 4 ++--
   3 files changed, 12 insertions(+), 2 deletions(-)

Modified: branches/release/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.cpp (original)
+++ branches/release/tools/quickbook/src/actions.cpp 2011-03-02 03:51:20 EST (Wed, 02 Mar 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: branches/release/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.hpp (original)
+++ branches/release/tools/quickbook/src/actions.hpp 2011-03-02 03:51:20 EST (Wed, 02 Mar 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: branches/release/tools/quickbook/src/doc_info_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/doc_info_grammar.cpp (original)
+++ branches/release/tools/quickbook/src/doc_info_grammar.cpp 2011-03-02 03:51:20 EST (Wed, 02 Mar 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