Hi,
when I build a coverage build of my software I get some undefined symbols
like global constructors keyed to src_utility_Tree.cpp_90B986A5_564B8955
I did some investigation and as you can see in the below test it only occurs
if I specify -Woverloaded-virtual.
What is strange, too is that if I save the preprocessed file (created with
the -E flag) the undefined symbol does NOT show up even if I
use -Woverloaded-virtual
I think this is a bug in g++
/opt2/linux/ix86/x86_64-pc-linux-gnu/bin/g++ --version
g++ (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
for flag in -Wpointer-arith -Woverloaded-virtual -Wcast-align ; do
/opt2/linux/ix86/x86_64-pc-linux-gnu/bin/g++ -o /tmp/Tree-coverage.o \
-c -O0 -g -m32 -D_REENTRANT -DACE_HAS_AIO_CALLS -DACE_USE_RCSID=0 \
-DACE_HAS_EXCEPTIONS -DCOVERAGE -fprofile-arcs -ftest-coverage -fPIC \
-Isrc -I/home/lothar/workspace/tradescapeAPI \
-I/opt2/linux/i686/ACE/1.5.8/ACE_wrappers \
-I/opt2/linux/i686/ACE/1.5.8/ACE_wrappers/TAO \
-I/opt2/linux/i686/ACE/1.5.8/ACE_wrappers/TAO/orbsvcs \
-I/opt2/linux/i686/include -I/opt2/linux/i686/include/boost-1_34 \
-I/opt2/linux/i686/include/python2.5 ${flag} src/utility/Tree.cpp; \
echo; echo ${flag}; nm -u -C /tmp/Tree-coverage.o;
done
-Wpointer-arith
U __cxa_atexit
U __dso_handle
U __gcov_init
U __gcov_merge_add
U _GLOBAL_OFFSET_TABLE_
U __gxx_personality_v0
U std::ios_base::Init::Init()
U std::ios_base::Init::~Init()
-Woverloaded-virtual
U __cxa_atexit
U __dso_handle
U __gcov_init
U __gcov_merge_add
U global constructors keyed to
src_utility_Tree.cpp_90B986A5_564B8955
U _GLOBAL_OFFSET_TABLE_
U __gxx_personality_v0
U std::ios_base::Init::Init()
U std::ios_base::Init::~Init()
-Wcast-align
U __cxa_atexit
U __dso_handle
U __gcov_init
U __gcov_merge_add
U _GLOBAL_OFFSET_TABLE_
U __gxx_personality_v0
U std::ios_base::Init::Init()
U std::ios_base::Init::~Init()
Lothar