diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-02 06:50:47 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-02 06:50:47 +0000 |
commit | d748f5b6ebde523f1a2f380dd8c2a7750d8c5e82 (patch) | |
tree | ea281e5ae297d73f9c3bcd2caa3fda60a5658ea0 /vm_core.h | |
parent | c1c45c1cf7eeb9248a8bd42faa53cac562ec102b (diff) |
* vm_core.h: use __has_attribute() instead of __clang__major__ because
clang says "Note that marketing version numbers should not be used
to check for language features, as different vendors use different
numbering schemes. Instead, use the Feature Checking Macros."
http://clang.llvm.org/docs/LanguageExtensions.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -109,7 +109,11 @@ #define UNLIKELY(x) (x) #endif /* __GNUC__ >= 3 */ -#if (defined(__clang__) && __clang_major__ >= 4) +#ifndef __has_attribute +# define __has_attribute(x) 0 +#endif + +#if __has_attribute(unused) #define UNINITIALIZED_VAR(x) x __attribute__((unused)) #elif defined(__GNUC__) && __GNUC__ >= 3 #define UNINITIALIZED_VAR(x) x = x |