diff --git a/ql/qldefines.hpp b/ql/qldefines.hpp index cfcfc47465..ce3933168c 100644 --- a/ql/qldefines.hpp +++ b/ql/qldefines.hpp @@ -196,13 +196,6 @@ __pragma(warning(disable : 4996)) # define QL_DEPRECATED_ENABLE_WARNING \ __pragma(warning(pop)) -#elif defined(__GNUC__) -# define QL_DEPRECATED __attribute__((deprecated)) -# define QL_DEPRECATED_DISABLE_WARNING \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -# define QL_DEPRECATED_ENABLE_WARNING \ - _Pragma("GCC diagnostic pop") #elif defined(__clang__) # define QL_DEPRECATED __attribute__((deprecated)) # define QL_DEPRECATED_DISABLE_WARNING \ @@ -210,6 +203,13 @@ _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") # define QL_DEPRECATED_ENABLE_WARNING \ _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define QL_DEPRECATED __attribute__((deprecated)) +# define QL_DEPRECATED_DISABLE_WARNING \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +# define QL_DEPRECATED_ENABLE_WARNING \ + _Pragma("GCC diagnostic pop") #else // we don't know how to enable it, just define the macros away # define QL_DEPRECATED diff --git a/ql/qldefines.hpp.cfg b/ql/qldefines.hpp.cfg index 5e139fa99e..4788a81f4f 100644 --- a/ql/qldefines.hpp.cfg +++ b/ql/qldefines.hpp.cfg @@ -197,13 +197,6 @@ __pragma(warning(disable : 4996)) # define QL_DEPRECATED_ENABLE_WARNING \ __pragma(warning(pop)) -#elif defined(__GNUC__) -# define QL_DEPRECATED __attribute__((deprecated)) -# define QL_DEPRECATED_DISABLE_WARNING \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -# define QL_DEPRECATED_ENABLE_WARNING \ - _Pragma("GCC diagnostic pop") #elif defined(__clang__) # define QL_DEPRECATED __attribute__((deprecated)) # define QL_DEPRECATED_DISABLE_WARNING \ @@ -211,6 +204,13 @@ _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") # define QL_DEPRECATED_ENABLE_WARNING \ _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define QL_DEPRECATED __attribute__((deprecated)) +# define QL_DEPRECATED_DISABLE_WARNING \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +# define QL_DEPRECATED_ENABLE_WARNING \ + _Pragma("GCC diagnostic pop") #else // we don't know how to enable it, just define the macros away # define QL_DEPRECATED