]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use -Wno-ignored-qualified when we hit gcc bug 36052
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 26 Apr 2008 00:11:57 +0000 (00:11 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 26 Apr 2008 00:11:57 +0000 (00:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@16012 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure
deal.II/configure.in
deal.II/lac/Makefile

index cd65cec5062ff9040d58b230a8e41304e1bf9054..37a3a8ce1beb08dcf574c471a0e0e97b8d0f8f61 100644 (file)
@@ -3883,6 +3883,53 @@ AC_DEFUN(DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG, dnl
 
 
 
+dnl -------------------------------------------------------------
+dnl Check for GCC bug 36052, see
+dnl   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36052
+dnl 
+dnl Usage: DEAL_II_CHECK_TYPE_QUALIFIER_BUG
+dnl 
+dnl --------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_TYPE_QUALIFIER_BUG, dnl
+[
+  case "$GXX_VERSION" in
+    gcc*)
+      AC_MSG_CHECKING(for warning bug with type qualifiers)
+      AC_LANG(C++)
+      CXXFLAGS="$CXXFLAGSG -Werror"
+      AC_TRY_COMPILE(
+        [
+          struct S {
+              typedef double value_type;
+          };
+    
+          template <typename T> struct Traits {
+              typedef const typename T::value_type dereference_type;
+          };
+    
+          template <class BlockVectorType> struct ConstIterator {
+              typedef typename Traits<BlockVectorType>::dereference_type dereference_type;
+        
+              dereference_type operator * () const  { return 0; }
+          };
+    
+          template class ConstIterator<S>;
+        ],
+        [
+        ],
+        [
+          AC_MSG_RESULT(no)
+        ],
+        [
+          AC_MSG_RESULT(yes)
+          CXXFLAGSG="$CXXFLAGSG -Wno-ignored-qualifiers"
+        ])
+    ;;
+  esac
+])
+
+
+
 
 dnl -------------------------------------------------------------
 dnl In the gcc libstdc++ headers for std::complex, there is 
index 529266de22bb99f87abc6524d974410ce5dd343e..b1cdf5978b03fd1be2634347722f2c806ade17b4 100755 (executable)
@@ -7303,6 +7303,86 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
+  case "$GXX_VERSION" in
+    gcc*)
+      { echo "$as_me:$LINENO: checking for warning bug with type qualifiers" >&5
+echo $ECHO_N "checking for warning bug with type qualifiers... $ECHO_C" >&6; }
+      ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      CXXFLAGS="$CXXFLAGSG -Werror"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+          struct S {
+              typedef double value_type;
+          };
+
+          template <typename T> struct Traits {
+              typedef const typename T::value_type dereference_type;
+          };
+
+          template <class BlockVectorType> struct ConstIterator {
+              typedef typename Traits<BlockVectorType>::dereference_type dereference_type;
+
+              dereference_type operator * () const  { return 0; }
+          };
+
+          template class ConstIterator<S>;
+
+int
+main ()
+{
+
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+
+          { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+          { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+          CXXFLAGSG="$CXXFLAGSG -Wno-ignored-qualifiers"
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ;;
+  esac
+
+
   if test "x$GXX" = "xyes" ; then
     { echo "$as_me:$LINENO: checking for problem with -Wsynth and std::complex" >&5
 echo $ECHO_N "checking for problem with -Wsynth and std::complex... $ECHO_C" >&6; }
index 3b4438ac37cc935e97887e9464c4dc4ba84b4873..e506b20e088680aa1dc11a1dbe9fc49c6d4ad9b2 100644 (file)
@@ -9,7 +9,7 @@ dnl    is stored.
 dnl
 dnl
 dnl Copyright: The deal.II authors
-dnl          1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+dnl          1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 dnl
 
 
@@ -189,6 +189,7 @@ DEAL_II_CHECK_SFINAE_BUG
 DEAL_II_CHECK_TEMPL_OP_DISAMBIGUATION_BUG
 DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG
 DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG
+DEAL_II_CHECK_TYPE_QUALIFIER_BUG
 DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX
 DEAL_II_HAVE_PRETTY_FUNCTION
 DEAL_II_HAVE_STD_ITERATOR
index 6f97793f671313f9fb25e2fbce27671de110660a..7153bc9f27f71d1786b07f50dbfe6a2b2ed6d1f3 100644 (file)
@@ -38,7 +38,7 @@ endif
 
 $(LIBDIR)/lac/%.g.$(OBJEXT) :
        @echo "=====lac==============debug======$(MT)== $(<F)"
-       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@ -save-temps
 $(LIBDIR)/lac/%.$(OBJEXT) :
        @echo "=====lac==============optimized==$(MT)== $(<F)"
        @$(CXX) $(CXXFLAGS.o) -c $< -o $@

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.