From:
[email protected]
Package: yacas
Severity: normal
Tags: patch
When building 'yacas' with gcc-3.4 I get the following error:
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../libltdl -I./plat/linux32 -g -O2 -Wall -pedantic -c deffile.cpp -MT deffile.lo -MD -MP -MF .deps/deffile.TPlo -fPIC -DPIC -o .libs/deffile.lo
In file included from grower.h:118,
from lisphash.h:11,
from deffile.h:11,
from deffile.cpp:3:
grower.inl: In destructor `CDeletingArrayGrower<T>::~CDeletingArrayGrower()': grower.inl:126: error: there are no arguments to `NrItems' that depend on a template parameter, so a declaration of `NrItems' must be available
grower.inl:126: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
grower.inl:129: error: there are no arguments to `Item' that depend on a template parameter, so a declaration of `Item' must be available
make[3]: *** [deffile.lo] Error 1
make[3]: Leaving directory `/yacas-1.0.55/src'
With the attached patch 'yacas' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/yacas-1.0.55/src/grower.inl ./src/grower.inl
--- ../tmp-orig/yacas-1.0.55/src/grower.inl 2001-07-18 21:59:34.000000000 +0200
+++ ./src/grower.inl 2004-08-17 12:45:35.390711513 +0200
@@ -123,10 +123,10 @@
inline CDeletingArrayGrower<T>::~CDeletingArrayGrower()
{
LispInt i,nr;
- nr = NrItems();
+ nr = this->NrItems();
for (i=0;i<nr;i++)
{
- delete Item(i);
+ delete this->Item(i);
}
}
#endif
diff -urN ../tmp-orig/yacas-1.0.55/configure ./configure
--- ../tmp-orig/yacas-1.0.55/configure 2003-05-20 22:56:49.000000000 +0200
+++ ./configure 2004-08-17 13:01:03.288649585 +0200
@@ -3588,10 +3588,10 @@
# If using GNU compilers, use extra flags to get warnings
if test "$GCC" = yes; then
- CFLAGS="$CFLAGS -Wall -pedantic"
+ CFLAGS="$CFLAGS -Wall"
fi;
if test "$GXX" = yes; then
- CXXFLAGS="$CXXFLAGS -Wall -pedantic"
+ CXXFLAGS="$CXXFLAGS -Wall"
fi;
# Checks for header files.
diff -urN ../tmp-orig/yacas-1.0.55/src/corefunctions.h ./src/corefunctions.h --- ../tmp-orig/yacas-1.0.55/src/corefunctions.h