From 0be97cb88ddd9fb45d0820f13d11970e8fb5d787 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 30 Sep 2013 18:40:42 +0000 Subject: [PATCH] Disable warning 327 for Intel compilers. This leads to (correct) 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*> (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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deal.II/cmake/setup_compiler_flags_intel.cmake b/deal.II/cmake/setup_compiler_flags_intel.cmake index ed67d96ad3..4ebd1e6939 100644 --- a/deal.II/cmake/setup_compiler_flags_intel.cmake +++ b/deal.II/cmake/setup_compiler_flags_intel.cmake @@ -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(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") -- 2.39.5