Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88916 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2009-11-16 16:56:48 +00:00
parent 4007324b58
commit 1546b11140

View File

@ -78,8 +78,10 @@
#define NORETURN
#endif
#ifdef __GNUC__
#if defined(__GNUC__) && ((__GNUC__ > 4)||(__GNUC__ == 4 && __GNUC_MINOR__ > 2))
#define ERROR_IF_USED __attribute__((error("wrong usage")))
#elif defined(__APPLE__)
#define ERROR_IF_USED __attribute__((unavailable))
#else
#define ERROR_IF_USED
#endif