Skip to content

Commit

Permalink
Suppress unused typedef warning when using clang.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Dec 10, 2015
1 parent dd28aed commit 073b294
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/boost/asio/detail/handler_type_requirements.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@
# include <boost/asio/handler_type.hpp>
#endif // defined(BOOST_ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS)

// Newer gcc needs special treatment to suppress unused typedef warnings.
#if defined(__GNUC__)
// Newer gcc, clang need special treatment to suppress unused typedef warnings.
#if defined(__clang__) && (__clang_major__ >= 7)
# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
#elif defined(__GNUC__)
# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
Expand Down

0 comments on commit 073b294

Please sign in to comment.