|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72467 - in trunk/libs/spirit/example/qi/compiler_tutorial: calc7 calc8 conjure1 mini_c
From: joel_at_[hidden]
Date: 2011-06-07 11:49:23
Author: djowel
Date: 2011-06-07 11:49:22 EDT (Tue, 07 Jun 2011)
New Revision: 72467
URL: http://svn.boost.org/trac/boost/changeset/72467
Log:
fixed odd g++ behavior
Text files modified:
trunk/libs/spirit/example/qi/compiler_tutorial/calc7/compiler.cpp | 3 ++-
trunk/libs/spirit/example/qi/compiler_tutorial/calc8/compiler.cpp | 3 ++-
trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/compiler.cpp | 3 ++-
trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.cpp | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
Modified: trunk/libs/spirit/example/qi/compiler_tutorial/calc7/compiler.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/calc7/compiler.cpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/calc7/compiler.cpp 2011-06-07 11:49:22 EDT (Tue, 07 Jun 2011)
@@ -40,7 +40,8 @@
void program::add_var(std::string const& name)
{
- variables[name] = variables.size();
+ size_t n = variables.size();
+ variables[name] = n;
}
void program::print_variables(std::vector<int> const& stack) const
Modified: trunk/libs/spirit/example/qi/compiler_tutorial/calc8/compiler.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/calc8/compiler.cpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/calc8/compiler.cpp 2011-06-07 11:49:22 EDT (Tue, 07 Jun 2011)
@@ -42,7 +42,8 @@
void program::add_var(std::string const& name)
{
- variables[name] = variables.size();
+ size_t n = variables.size();
+ variables[name] = n;
}
void program::print_variables(std::vector<int> const& stack) const
Modified: trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/compiler.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/compiler.cpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/conjure1/compiler.cpp 2011-06-07 11:49:22 EDT (Tue, 07 Jun 2011)
@@ -45,7 +45,8 @@
void function::add_var(std::string const& name)
{
- variables[name] = variables.size();
+ size_t n = variables.size();
+ variables[name] = n;
}
void function::link_to(std::string const& name, std::size_t address)
Modified: trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.cpp (original)
+++ trunk/libs/spirit/example/qi/compiler_tutorial/mini_c/compiler.cpp 2011-06-07 11:49:22 EDT (Tue, 07 Jun 2011)
@@ -45,7 +45,8 @@
void function::add_var(std::string const& name)
{
- variables[name] = variables.size();
+ size_t n = variables.size();
+ variables[name] = n;
}
void function::link_to(std::string const& name, std::size_t address)
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