diff dw.h @ 1601:71e0a3ad07f7

Enable level 3 warnings in DEBUG mode with Visual C to show deprecation warnings. Source code cleanup to eliminate the warnings now generated on this level.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 26 Feb 2012 09:21:35 +0000
parents cbfdd56e3e72
children 38da4aa23b7c
line wrap: on
line diff
--- a/dw.h	Sat Feb 25 23:35:59 2012 +0000
+++ b/dw.h	Sun Feb 26 09:21:35 2012 +0000
@@ -1438,23 +1438,27 @@
 
 /* Visual C */
 #if defined(_MSC_VER) 
-#define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func
+#  if _MSC_VER >= 1400
+#  define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func
+#  endif
 /* Clang */
 #elif defined(__has_extension)
-#	if __has_extension(attribute_deprecated_with_message) 
-#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
-#	else
-#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
-#	endif
+#  if __has_extension(attribute_deprecated_with_message) 
+#  define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
+#  else
+#  define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
+#  endif
 /* GCC */
 #elif defined(__GNUC__)
-#	if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 
-#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
-#	else
-#	define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
-#	endif
-#else
+#  if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 
+#  define DW_DEPRECATED(func, message) func __attribute__ ((deprecated (message)))
+#  else
+#  define DW_DEPRECATED(func, message) func __attribute__ ((deprecated))
+#  endif
+#endif
+
 /* Compiler without deprecation support */
+#ifndef DW_DEPRECATED
 #define DW_DEPRECATED(func, message) func
 #endif