]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement a bugtest to be able to compile with clang
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2012 21:04:12 +0000 (21:04 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2012 21:04:12 +0000 (21:04 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@26393 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/bugs.m4
deal.II/contrib/cmake/check/check_for_compiler_bugs.cmake
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/config.h.in.old

index dab1092d679d54cedc040c86a727e9e4604015b2..0f65774b90a8cf57069f63efa0330e87ea6dea84 100644 (file)
@@ -406,60 +406,6 @@ AC_DEFUN(DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS, dnl
 ])
 
 
-
-dnl -------------------------------------------------------------
-dnl Some compiler versions, notably ICC, have trouble with the
-dnl following code in which we explicitly call a destructor.
-dnl This has to be worked around with a typedef. The problem is
-dnl that the workaround fails with some other compilers, so that
-dnl we can not unconditionally use the workaround...
-dnl
-dnl Usage: DEAL_II_CHECK_EXPLICIT_DESTRUCTOR_BUG
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_CHECK_EXPLICIT_DESTRUCTOR_BUG, dnl
-[
-  AC_MSG_CHECKING(for explicit destructor call bug)
-  AC_LANG(C++)
-  CXXFLAGS="$CXXFLAGSG"
-  AC_TRY_COMPILE(
-    [
-      namespace dealii
-      {
-        namespace FEValuesViews
-        {
-          template <int dim, int spacedim> struct Scalar {};
-        }
-
-        template <int dim, int spacedim>
-        struct X
-        {
-            FEValuesViews::Scalar<dim,spacedim> scalars[dim*spacedim];
-
-            void f()
-              {
-                scalars[0].dealii::FEValuesViews::Scalar<dim,spacedim>::~Scalar ();
-              }
-        };
-
-        template struct X<2,2>;
-      }
-    ],
-    [],
-    [
-      AC_MSG_RESULT(no)
-    ],
-    [
-      AC_MSG_RESULT(yes. using workaround)
-      AC_DEFINE_UNQUOTED(DEAL_II_EXPLICIT_DESTRUCTOR_BUG, 1,
-                         [Define if we have to work around a bug where the
-                          compiler doesn't accept an explicit destructor call.
-                          See the aclocal.m4 file in the top-level directory
-                          for a description of this bug.])
-    ])
-])
-
-
 dnl -------------------------------------------------------------
 dnl Versions of GCC before 3.0 had a problem with the following
 dnl code:
index 69bab9e43689e66ab31e882c8371061e8c442d38..e2293a41b6395f029cd2e64160795737da10a115 100644 (file)
@@ -46,3 +46,38 @@ IF(DEAL_II_MEMBER_OP_TEMPLATE_INST_OK)
 ELSE()
   SET(DEAL_II_MEMBER_OP_TEMPLATE_INST "template")
 ENDIF()
+
+
+
+#
+# Some compiler versions, notably ICC, have trouble with the
+# following code in which we explicitly call a destructor.
+# This has to be worked around with a typedef. The problem is
+# that the workaround fails with some other compilers, so that
+# we can not unconditionally use the workaround...
+#
+CHECK_CXX_COMPILER_BUG(
+  "
+  namespace dealii
+  {
+    namespace FEValuesViews
+    {
+      template <int dim, int spacedim> struct Scalar {};
+    }
+
+    template <int dim, int spacedim>
+    struct X
+    {
+        FEValuesViews::Scalar<dim,spacedim> scalars[dim*spacedim];
+
+        void f()
+          {
+            scalars[0].dealii::FEValuesViews::Scalar<dim,spacedim>::~Scalar ();
+          }
+    };
+
+    template struct X<2,2>;
+  }
+  int main() { return 0; }
+  "
+  DEAL_II_EXPLICIT_DESTRUCTOR_BUG)
index d68451ff2c5771919d22ba3cd8830617441aa19a..09df9bcc65491f9e0697c6725fbd6bd609695fcb 100644 (file)
  */
 #define DEAL_II_MEMBER_OP_TEMPLATE_INST @DEAL_II_MEMBER_OP_TEMPLATE_INST@
 
+/* Define if we have to work around a bug where the compiler doesn't accept
+ * an explicit destructor call. See the aclocal.m4 file in the top-level
+ * directory for a description of this bug.
+ */
+#cmakedefine DEAL_II_EXPLICIT_DESTRUCTOR_BUG
+
 
 
 
index 5670bd3b3d0ec417bdbb051b952f63d9b35b614c..1d08801e38b3e7f03ef2a5041761c77da29bc4ce 100644 (file)
    constructors. */
 #cmakedefine DEAL_II_EXPLICIT_CONSTRUCTOR_BUG
 
-/* Define if we have to work around a bug where the compiler doesn't accept an
-   explicit destructor call. See the aclocal.m4 file in the top-level
-   directory for a description of this bug. */
-#cmakedefine DEAL_II_EXPLICIT_DESTRUCTOR_BUG
-
 /* Defined if the compiler needs a workaround for certain problems with taking
    the address of template template functions. For the details, look at
    aclocal.m4 in the top-level directory. */

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.