------- Comment #3 from howarth at nitro dot med dot uc dot edu  2005-12-03 
02:50 -------
Andrew,
       Thanks. For now the -ffriend-injection solves the problem. However,
there is one other compile issue with g++ 4.1.0 which the  -ffriend-injection
doesn't fix (and I assumed was the same issue). Is there yet another flag I can
set to override the new strictness causing this compile error as well?
                          Jack
ps I am attaching  _cdsVector.i generated with...

g++-4 -ffriend-injection -E -dD _cdsVector.cc -O3 -fPIC -mtune=970 -g
-DX_MMAP_FLAGS=0 -DFORTRAN_INIT -fno-common -DDARWIN -D_REENTRANT -DNDEBUG
-I/Users/howarth/Desktop/xplor-nih-2.12/python/
-I/Users/howarth/Desktop/xplor-nih-2.12/arch/Darwin_8/include
-I/Users/howarth/Desktop/xplor-nih-2.12/python/swig_wrappers -DCPLUSPLUS
-DUSE_CDS_NAMESPACE -I/Users/howarth/Desktop/xplor-nih-2.12/python/
-I/Users/howarth/Desktop/xplor-nih-2.12/arch/Darwin_8/include -DSWIGPY_GLOBAL
-I.
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
-I/Users/howarth/Desktop/xplor-nih-2.12/CDSlib
-I/Users/howarth/Desktop/xplor-nih-2.12/common
-I/Users/howarth/Desktop/xplor-nih-2.12/intVar
-I/Users/howarth/Desktop/xplor-nih-2.12/nmrPot
-I/Users/howarth/Desktop/xplor-nih-2.12/vmd
-I/Users/howarth/Desktop/xplor-nih-2.12/devel
-DNIHXPLOR_VERSION='"2.12-custom"' -DSWIGPY_NOINCLUDE -o _cdsVector.i

which generates the compile errors of...

_cdsVector.cc: In function 'CDSVector<int, 0, CDS::DefaultAlloc>
CDSVector_Sl_int_Sg____pow__(CDSVector<int, 0, CDS::DefaultAlloc>*, const
float_type&)':
_cdsVector.cc:1173: warning: converting to 'int' from 'double'
/Users/howarth/Desktop/xplor-nih-2.12/CDSlib/cdsVector.hh: In member function
'CDSVectorBase<T, ALLOC>& CDSVectorBase<T, ALLOC>::operator*=(const T1&) [with
T1 = double, T = int, ALLOC = CDS::DefaultAlloc]':
_cdsVector.cc:1177:   instantiated from here
/Users/howarth/Desktop/xplor-nih-2.12/CDSlib/cdsVector.hh:242: warning:
converting to 'int' from 'double'
_cdsVector.cc: In function 'T sum(const CDSVector<T, 0, CDS::DefaultAlloc>&)
[with T = int]':
_cdsVector.cc:2426:   instantiated from here
_cdsVector.cc:913: warning: converting to 'int' from 'double'
_cdsVector.cc: In function 'float_type norm(const CDSVector<T, 0,
CDS::DefaultAlloc>&) [with T = double]':
_cdsVector.cc:6004:   instantiated from here
_cdsVector.cc:942: error: no matching function for call to 'norm(const
double&)'

that -ffriend-injection can't eliminate. No problem building this with g++ from
gcc 4.0.1 of Xcode 2.2.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25238

Reply via email to