Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix __alloc_size__ availability detection (Clang)
Since __clang_major__/__clang_minor__ etc. are vendor dependent values, we cannot implement the feature detection based on it. For example, Apple clang versioning is different from the FreeBSD clang. (At this time, Apple clang version is "6.0 (clang-600.0.51)" and __clang_major__ is 6.) Instead of this, we can use the clang feature detection macro, __has_attribute. * include/gc_config_macros.h (GC_ATTR_ALLOC_SIZE): Replace predefined __clang_major/minor__ testing with __has_attribute() one (in case of clang).
- Loading branch information