Limit __builtin_bswap16 to GCC >= 5 as it was implemented on 4.8

This commit is contained in:
Ebrahim Byagowi 2018-11-29 23:47:20 +03:30 committed by GitHub
parent ac0264717b
commit e7bd29ea11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -721,7 +721,7 @@ struct BEInt<Type, 2>
}
inline operator Type (void) const
{
#if defined(__GNUC__) || defined(__clang__)
#if (defined(__GNUC__) && __GNUC__ >= 5) || defined(__clang__)
/* Spoon-feed the compiler a big-endian integer with alignment 1.
* https://github.com/harfbuzz/harfbuzz/pull/1398 */
struct __attribute__((packed)) packed_uint16_t { uint16_t v; };