From: deal Date: Fri, 30 May 2003 20:05:57 +0000 (+0000) Subject: Fix more places where we generate warnings from autoconf tests. This X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=744228b7516e045198888c6ad776b9a9a88548ba;p=dealii-svn.git Fix more places where we generate warnings from autoconf tests. This is not compatible with the use of -Werror in CXXFLAGS. git-svn-id: https://svn.dealii.org/trunk@7695 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 8380c06f14..e64939e33a 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -1502,7 +1502,7 @@ AC_DEFUN(DEAL_II_CHECK_RAND_R, dnl #include ], [ -unsigned int seed = 0; +int seed = 0; int i=rand_r(&i); ], [ @@ -1743,7 +1743,7 @@ dnl dnl /* ----------------------------------------------- */ dnl /* Problem 14: Access control. Friendship is not */ dnl /* granted although explicitly declared. */ -dnl template class T { void bar (); }; +dnl template class T { int bar (); }; dnl dnl template class T<1,M> { dnl private: @@ -1751,8 +1751,8 @@ dnl static int i; dnl template friend class T; dnl }; dnl -dnl template void T::bar () { -dnl T::i; +dnl template int T::bar () { +dnl return T::i; dnl }; dnl dnl template class T<2,1> ; @@ -1771,16 +1771,17 @@ AC_DEFUN(DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS, dnl CXXFLAGS="$CXXFLAGSG" AC_TRY_COMPILE( [ - template class T { void bar (); }; + template struct T { int bar (); }; - template class T<1,M> { + template struct T<1,M> { + T (); private: static int i; template friend class T; }; - template void T::bar () { - T::i; + template int T::bar () { + return T::i; }; template class T<2,1> ; @@ -1811,7 +1812,7 @@ dnl /* ----------------------------------------------- */ dnl struct X dnl { dnl template -dnl X operator = (T2 &){}; +dnl X operator = (T2 &) { return X(); }; dnl }; dnl dnl template X X::operator= (float &); @@ -1835,7 +1836,7 @@ AC_DEFUN(DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST, dnl struct X { template - X operator = (T2 &){}; + X operator = (T2 &) { return X(); }; }; template X X::operator= (float &); @@ -2040,7 +2041,7 @@ template class Y { }; template class X<1,T> { - X () { Y::i; }; // access private field + int f () { return Y::i; }; // access private field }; template class X<1,int>; @@ -2151,7 +2152,7 @@ AC_DEFUN(DEAL_II_CHECK_TEMPLATE_TEMPLATE_TYPEDEF_BUG, dnl }; template