Skip to content

Commit

Permalink
clang also defines __GNUC__
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfkonrad committed Sep 24, 2024
1 parent fb83510 commit 5b0053b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions ql/qldefines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,20 @@
__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 \
_Pragma("clang diagnostic push") \
_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
Expand Down
14 changes: 7 additions & 7 deletions ql/qldefines.hpp.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,20 @@
__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 \
_Pragma("clang diagnostic push") \
_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
Expand Down

0 comments on commit 5b0053b

Please sign in to comment.