1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Disable RBIMPL_ATTR_DEPRECATED for Coverity Scan build

Coverity Scan emulates gcc but seems not to support this attribute
correctly.
This commit is contained in:
Yusuke Endoh 2021-06-26 02:29:12 +09:00
parent c86f03be55
commit 457a4913be

View file

@ -28,7 +28,11 @@
#include "ruby/internal/has/extension.h"
/** Wraps (or simulates) `[[deprecated]]` */
#if RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message)
#if defined(__COVERITY__)
/* Coverity Scan emulates gcc but seems not to support this attribute correctly */
# define RBIMPL_ATTR_DEPRECATED(msg)
#elif RBIMPL_HAS_EXTENSION(attribute_deprecated_with_message)
# define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
#elif defined(__cplusplus) && RBIMPL_COMPILER_SINCE(GCC, 10, 1, 0) /* && RBIMPL_COMPILER_BEFORE(GCC, 10, X, Y) */