]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve deprecation messages 6998/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 29 Jul 2018 23:32:43 +0000 (01:32 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 29 Jul 2018 23:35:23 +0000 (01:35 +0200)
13 files changed:
include/deal.II/base/config.h.in
include/deal.II/base/sacado_product_type.h
include/deal.II/dofs/function_map.h
include/deal.II/grid/tria_boundary.h
include/deal.II/grid/tria_boundary_lib.h
include/deal.II/lac/constraint_matrix.h
include/deal.II/lac/parallel_block_vector.h
include/deal.II/lac/parallel_vector.h
include/deal.II/lac/petsc_parallel_block_sparse_matrix.h
include/deal.II/lac/petsc_parallel_block_vector.h
include/deal.II/lac/petsc_parallel_sparse_matrix.h
include/deal.II/lac/petsc_parallel_vector.h
source/base/timer.cc

index 3ab70dad51f6d63cf980183de7c8430fdd11942d..14d4a0c61fcebcba488807ffe3bb0c1f3e7b36d2 100644 (file)
@@ -389,9 +389,15 @@ _Pragma("GCC diagnostic pop")
  * http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
  */
 
-#define DEAL_II_STRINGIZE_HELPER(x) #x
-#define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
-#define DEAL_II_WARNING(desc) message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : Warning: " #desc)
+#ifdef _MSC_VER
+  #define DEAL_II_STRINGIZE_HELPER(x) #x
+  #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
+  #define DEAL_II_DO_PRAGMA(x) __pragma(x)
+  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
+#else
+  #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
+  #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
+#endif
 
 /***********************************************************************
  * Final inclusions:
index 450b396843d441685729db0a0ca87357abef7346..696ded057431ef5153b488ce8d15aa87844beeb4 100644 (file)
@@ -3,8 +3,7 @@
 
 #include <deal.II/base/config.h>
 
-#pragma DEAL_II_WARNING( \
-  "This file is deprecated. Use <deal.II/differentiation/ad/sacado_product_types.h> instead.")
+DEAL_II_WARNING(`"This file is deprecated. Use <deal.II/differentiation/ad/sacado_product_types.h> instead.")
 
 #include <deal.II/differentiation/ad/sacado_product_types.h>
 
index 2e00e3fccd5360332e13f4f4006fc288d64ba2f8..b263aafad795992d4f8f38237f539d721327cb48 100644 (file)
@@ -20,6 +20,6 @@
 
 #include <deal.II/dofs/deprecated_function_map.h>
 
-#pragma DEAL_II_WARNING("This file is deprecated.")
+DEAL_II_WARNING("This file is deprecated.")
 
 #endif
index 36f1dd64b0f78ae27071667e99eb3c7048e2de52..2571178f4b51c57f443c5c2a0abf52dbcf31d6b3 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <deal.II/base/config.h>
 
-#pragma DEAL_II_WARNING( \
-  "This file is deprecated. Use the Manifold classes instead.")
+DEAL_II_WARNING("This file is deprecated. Use the Manifold classes instead.")
 
 #endif
index 8832284b2ace051095cb9bf391e602a8ee148e17..fed67128235536172e54460c2a50e4e0cad61118 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <deal.II/base/config.h>
 
-#pragma DEAL_II_WARNING( \
-  "This file is deprecated.Use the Manifold classes instead.")
+DEAL_II_WARNING("This file is deprecated.Use the Manifold classes instead.")
 
 #endif
index 28d95d106f698410fcd7847cca015123d1b43e36..f7a5dfa9a3ce6a727aead4d609f5c5f1163fe33f 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <deal.II/base/config.h>
 
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
   "This file is deprecated. Use <deal.II/lac/affine_constraints.h> instead.")
 
 #include <deal.II/lac/affine_constraints.h>
index 22e7e9151bd3f4c5355b1398c9daedf7cb8132f8..2bbda29393843992a8b016d80074b47fa0b15b04 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <deal.II/lac/la_parallel_block_vector.h>
 
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
   "This file is deprecated. Use <deal.II/lac/la_block_vector.h> and LinearAlgebra::distributed::BlockVector instead.")
 
 #include <cstring>
index dbfce5cbe0a20c8b3559a6ee66e357dd0422e098..d21b59f0119040e20f8fdf0d0de6af442fa31d48 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <deal.II/lac/la_parallel_vector.h>
 
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
   "This file is deprecated. Use <deal.II/lac/la_parallel_vector.h> and LinearAlgebra::distributed::Vector instead.")
 
 #include <cstring>
index 617a95a8591bad21a1bae9bb1dd03da97d761fc7..3443d5d33304cea50716dd25f8a7c7e7ea8e5747 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <deal.II/lac/petsc_block_sparse_matrix.h>
 
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
   "This file is deprecated. Use deal.II/lac/petsc_block_sparse_matrix.h instead!")
 
 #endif // dealii_petsc_parallel_block_sparse_matrix_h
index 5a3ff99e34137e5ccfe34c09bf1a27422433bf23..c6a9844c4c5a6716d780a36dd7c8074d2c6a6996 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <deal.II/lac/petsc_block_vector.h>
 
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
   "This file is deprecated. Use deal.II/lac/petsc_block_vector.h instead!")
 
 #endif
index 559d6c385cd47fff31dfbc4d85af7b8a9c6fa148..0b203b3f3c185b20490100448e0c0c951b06da0b 100644 (file)
@@ -20,8 +20,8 @@
 
 #  include <deal.II/lac/petsc_sparse_matrix.h>
 
-#  pragma DEAL_II_WARNING( \
-    "This file is deprecated. Use deal.II/lac/petsc_sparse_matrix.h instead.")
+DEAL_II_WARNING(
+  "This file is deprecated. Use deal.II/lac/petsc_sparse_matrix.h instead.")
 
 #endif
 /*---------------------- petsc_parallel_sparse_matrix.h ---------------------*/
index a238651932c1acd2b52a2ac125aefcf511b72ff7..2c75995cda091de477d9d158dcd6dbfeab979159 100644 (file)
@@ -20,8 +20,8 @@
 
 #  include <deal.II/lac/petsc_vector.h>
 
-#  pragma DEAL_II_WARNING( \
-    "This file is deprecated. Use deal.II/lac/petsc_vector.h instead!")
+DEAL_II_WARNING(
+  "This file is deprecated. Use deal.II/lac/petsc_vector.h instead!")
 
 #endif
 /*------------------------- petsc_parallel_vector.h -------------------------*/
index 710abf4b03baee32f77944f0ef3f0d93d5d06703..007f9dd017d67a35afebfddf28c411b44e7abcad 100644 (file)
@@ -127,7 +127,7 @@ CPUClock::now() noexcept
   getrusage(RUSAGE_SELF, &usage);
   system_cpu_duration = usage.ru_utime.tv_sec + 1.e-6 * usage.ru_utime.tv_usec;
 #else
-#  pragma DEAL_II_WARNING("Unsupported platform. Porting not finished.")
+  DEAL_II_WARNING("Unsupported platform. Porting not finished.")
 #endif
   return time_point(
     internal::TimerImplementation::from_seconds<duration>(system_cpu_duration));

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.