comparison dw.h @ 2166:f98cecae5402

Revisiting gcc versions, decided to use the official documentation for reference: First versions documenting support for the features, only goes back to 2.95. unused: https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_4.html#SEC90 deprecated: https://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Function-Attributes.html deprecated with message: https://gcc.gnu.org/onlinedocs/gcc-4.5.4/gcc/Function-Attributes.html
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 01 Oct 2020 18:01:45 +0000
parents 98db0e81a514
children 6533fc42c951
comparison
equal deleted inserted replaced
2165:87d574dda8f5 2166:f98cecae5402
41 # define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func 41 # define DW_DEPRECATED(func, message) __declspec(deprecated(message)) func
42 # endif 42 # endif
43 /* Clang or GCC */ 43 /* Clang or GCC */
44 #elif __has_extension(attribute_deprecated_with_message) || __GNUC_PREREQ(4, 5) 44 #elif __has_extension(attribute_deprecated_with_message) || __GNUC_PREREQ(4, 5)
45 # define DW_DEPRECATED(func, message) func __attribute__((deprecated (message))) 45 # define DW_DEPRECATED(func, message) func __attribute__((deprecated (message)))
46 #elif __has_extension(attribute_deprecated) || __GNUC_PREREQ(3, 2) 46 #elif __has_extension(attribute_deprecated) || __GNUC_PREREQ(3, 1)
47 # define DW_DEPRECATED(func, message) func __attribute__((deprecated)) 47 # define DW_DEPRECATED(func, message) func __attribute__((deprecated))
48 #endif 48 #endif
49 49
50 /* Compiler without deprecation support */ 50 /* Compiler without deprecation support */
51 #ifndef DW_DEPRECATED 51 #ifndef DW_DEPRECATED
52 #define DW_DEPRECATED(func, message) func 52 #define DW_DEPRECATED(func, message) func
53 #endif 53 #endif
54 54
55 /* Support for unused variables in supported compilers */ 55 /* Support for unused variables in supported compilers */
56 #if __has_attribute(unused) || __GNUC_PREREQ(3, 1) 56 #if __has_attribute(unused) || __GNUC_PREREQ(2, 95)
57 #define DW_UNUSED(x) x __attribute__((__unused__)) 57 #define DW_UNUSED(x) x __attribute__((__unused__))
58 #else 58 #else
59 #define DW_UNUSED(x) x 59 #define DW_UNUSED(x) x
60 #endif 60 #endif
61 61