]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Disable warning 327 for Intel compilers. This leads to (correct)
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 Sep 2013 18:40:42 +0000 (18:40 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 30 Sep 2013 18:40:42 +0000 (18:40 +0000)
warnings of the kind

File: source/fe/fe_values.cc Line: 430

/.../deal.II/source/fe/fe_values.cc(430): warning #327: NULL reference is not allowed

      fe_values(*static_cast<dealii::FEValuesBase<dim, spacedim>*> (0)),
                ^
          detected during instantiation of "dealii::FEValuesViews::Tensor<2, dim, spacedim>::Tensor() [with dim=1, spacedim=1]" at line 76 of "/usr/include/c++/4.6/bits/stl_construct.h"

But we'd like to use this construct anyway.

git-svn-id: https://svn.dealii.org/trunk@31043 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_compiler_flags_intel.cmake

index ed67d96ad3c6c744f47e41360256f6e088522d2f..4ebd1e69393d86832934305e67fb1dfc746129f4 100644 (file)
@@ -64,6 +64,11 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-w2")
 #   -w175  subscript out of range
 #   -w177  declared but not referenced
 #   -w279  controlling expression is constant
+#   -w327  NULL reference is not allowed
+#          (the compiler is correct here in that statements like
+#           *static_cast<int*>(0) are not allowed to initialize
+#           references; however, it's the only useful way to do
+#           so if you need an invalid value for a reference)
 #   -w383  value copied to temporary, reference to temporary used
 #   -w981  operands are evaluated in unspecified order
 #   -w1418 external function definition with no prior declaration
@@ -75,6 +80,7 @@ ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd68")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd175")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd177")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd279")
+ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd327")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd383")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd981")
 ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-wd1418")

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.