Failed to compile using g++ 4.7
Opened this issue · 2 comments
GoogleCodeExporter commented
The output when I tried to build:
$ make
cd dbg98 ; make -j 2 -f ../util/Makefile generate BFLAGS=-g3
CXXFLAGS="-std=c++98 -Wno-c++0x-compat"
make[1]: Entering directory
`/home/guanyu/Programs/MapReduce/gcl/google-concurrency-library/dbg98'
make[1]: Nothing to be done for `generate'.
make[1]: Leaving directory
`/home/guanyu/Programs/MapReduce/gcl/google-concurrency-library/dbg98'
cd dbg98 ; make -j 2 -f ../util/Makefile test BFLAGS=-g3 CXXFLAGS="-std=c++98
-Wno-c++0x-compat"
make[1]: Entering directory
`/home/guanyu/Programs/MapReduce/gcl/google-concurrency-library/dbg98'
sh ../util/exetest.sh dynarray_test
sh ../util/exetest.sh atomic_c_test
sh ../util/exetest.sh atomic_cpp_test
g++ -MMD -MP -Wall -Werror -Wno-error=c++0x-compat -I. -I../include -g3
-std=c++98 -Wno-c++0x-compat ../testing/counter_test.cc -c -o counter_test.o
g++ -MMD -MP -Wall -Werror -Wno-error=c++0x-compat -I. -I../include -g3
-std=c++98 -Wno-c++0x-compat -I../third_party/googletest/include
-I../third_party/googletest -I../third_party/googlemock/include
-I../third_party/googlemock ../third_party/googlemock/src/gmock-all.cc -c -o
gmock-all.o
In file included from ../testing/counter_test.cc:18:0:
../include/counter.h: In instantiation of ‘void
gcl::counter::strong_duplex<Integral>::erase(gcl::counter::strong_duplex<Integra
l>::broker_type*, Integral) [with Integral = int;
gcl::counter::strong_duplex<Integral>::broker_type =
gcl::counter::strong_broker<int>]’:
../include/counter.h:622:5: required from
‘gcl::counter::strong_broker<Integral>::~strong_broker() [with Integral =
int]’
../testing/counter_test.cc:105:12: required from here
../include/counter.h:570:5: error: ‘operator+=’ was not declared in this
scope, and no declarations were found by argument-dependent lookup at the point
of instantiation [-fpermissive]
../include/counter.h:570:5: note: declarations in dependent base
‘gcl::counter::bumper<int, (gcl::counter::atomicity)2u>’ are not found by
unqualified lookup
../include/counter.h:570:5: note: use ‘this->operator+=’ instead
../include/counter.h: In instantiation of ‘void
gcl::counter::weak_duplex<Integral>::erase(gcl::counter::weak_duplex<Integral>::
broker_type*, Integral) [with Integral = int;
gcl::counter::weak_duplex<Integral>::broker_type =
gcl::counter::weak_broker<int>]’:
../include/counter.h:714:5: required from
‘gcl::counter::weak_broker<Integral>::~weak_broker() [with Integral = int]’
../testing/counter_test.cc:115:12: required from here
../include/counter.h:676:5: error: ‘operator+=’ was not declared in this
scope, and no declarations were found by argument-dependent lookup at the point
of instantiation [-fpermissive]
../include/counter.h:676:5: note: declarations in dependent base
‘gcl::counter::bumper<int, (gcl::counter::atomicity)2u>’ are not found by
unqualified lookup
../include/counter.h:676:5: note: use ‘this->operator+=’ instead
make[1]: *** [counter_test.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory
`/home/guanyu/Programs/MapReduce/gcl/google-concurrency-library/dbg98'
make: *** [test_dbg98] Error 2
Original issue reported on code.google.com by guanyuwa...@gmail.com
on 5 Aug 2013 at 6:11
GoogleCodeExporter commented
I tried by changing 'operator+=' to 'this->operator+='. The problem fixed.
Original comment by guanyuwa...@gmail.com
on 5 Aug 2013 at 6:16
GoogleCodeExporter commented
Thanks - we'll put in a fix for this.
Original comment by alasdair.mackintosh
on 5 Aug 2013 at 7:48