diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2017-08-25 01:05:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 01:05:07 (GMT) |
commit | 4db65c1d99280a757823914efaa96d2e87f41844 (patch) | |
tree | d7c54a98654db75c7663f728b0616dc62a9f6567 | |
parent | 35a39e0e53678f0045bf7148e803909434d7a834 (diff) | |
parent | 252ce14fd2ce8e4ff6038e79fe48a6b38643f8c9 (diff) | |
download | lz4-4db65c1d99280a757823914efaa96d2e87f41844.zip lz4-4db65c1d99280a757823914efaa96d2e87f41844.tar.gz lz4-4db65c1d99280a757823914efaa96d2e87f41844.tar.bz2 |
Merge pull request #393 from terrelln/deprecate2
Don't use C++11 deprecation attribute with clang
-rw-r--r-- | lib/lz4.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -419,9 +419,11 @@ union LZ4_streamDecode_u { # define LZ4_DEPRECATED(message) /* disable deprecation warnings */ #else # define LZ4_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -# if defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ +# if defined(__clang__) /* clang doesn't handle mixed C++11 and CNU attributes */ +# define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) +# elif defined (__cplusplus) && (__cplusplus >= 201402) /* C++14 or greater */ # define LZ4_DEPRECATED(message) [[deprecated(message)]] -# elif (LZ4_GCC_VERSION >= 405) || defined(__clang__) +# elif (LZ4_GCC_VERSION >= 405) # define LZ4_DEPRECATED(message) __attribute__((deprecated(message))) # elif (LZ4_GCC_VERSION >= 301) # define LZ4_DEPRECATED(message) __attribute__((deprecated)) |