]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix pragma warnings warnings 1089/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 6 Jul 2015 09:31:34 +0000 (05:31 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 6 Jul 2015 09:31:34 +0000 (05:31 -0400)
PR #1076 disabled warnings due to disabling unknown warnings with a
pragma. This causes the warning

src.cxx:4:3: error: unknown warning group '-Wpragmas', ignored [-Werror,-Wunknown-pragmas]
  _Pragma("GCC diagnostic ignored \"-Wpragmas\"")

with Clang 3.4.0. It seems it supports Wunknown-pragmas which is okay to be
used with gcc too. Sigh.

cmake/checks/check_01_compiler_features.cmake
include/deal.II/base/config.h.in

index 893ae2e6b6be13b75e17344712eb73fb0a2d2705..cdc60ca6c8076f74fff6b2af884653f21ea14118 100644 (file)
@@ -327,6 +327,7 @@ CHECK_CXX_SOURCE_COMPILES(
   "
   _Pragma(\"GCC diagnostic push\")
   _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wextra\\\\\\\"\")
+  _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunknown-pragmas\\\\\\\"\")
   _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wpragmas\\\\\\\"\")
   int main() { return 0; }
   _Pragma(\"GCC diagnostic pop\")
index d3b7a9696400bfb0ba8c30a94da5e690898b451a..1100215fad1b6d57379d311a45c273fb33285f22 100644 (file)
 
 #  define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS                      \
 _Pragma("GCC diagnostic push")                                   \
+_Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"")          \
 _Pragma("GCC diagnostic ignored \"-Wpragmas\"")                  \
 _Pragma("GCC diagnostic ignored \"-Wextra\"")                    \
 _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"")       \

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.