Suppress warning: this use of "defined" may not be portable

Use of defined() in macro expansion is considered non portable.
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01577.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-12-09 22:45:38 +00:00
Родитель c047f58da6
Коммит 1f63c0fcb8
1 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -62,12 +62,15 @@ extern "C" {
#endif
#ifndef GCC_VERSION_SINCE
# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
# define GCC_VERSION_SINCE(major, minor, patchlevel) \
(defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__) && \
((__GNUC__ > (major)) || \
((__GNUC__ == (major) && \
((__GNUC_MINOR__ > (minor)) || \
(__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel)))))))
(__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))))
# else
# define GCC_VERSION_SINCE(major, minor, patchlevel) 0
# endif
#endif
/* likely */