mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress GCC warning about unknown sanitizers
See also: https://travis-ci.org/ruby/ruby/jobs/451710726#L1941 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
234ffbce0e
commit
9722ed0e52
2 changed files with 11 additions and 3 deletions
4
gc.c
4
gc.c
|
@ -4164,11 +4164,9 @@ ruby_stack_check(void)
|
|||
return stack_check(GET_EC(), STACKFRAME_FOR_CALL_CFUNC);
|
||||
}
|
||||
|
||||
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
|
||||
(
|
||||
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(static void mark_locations_array(rb_objspace_t *objspace, register const VALUE *x, register long n));
|
||||
static void
|
||||
mark_locations_array(rb_objspace_t *objspace, register const VALUE *x, register long n)
|
||||
)
|
||||
{
|
||||
VALUE v;
|
||||
while (n--) {
|
||||
|
|
10
internal.h
10
internal.h
|
@ -68,6 +68,16 @@ extern "C" {
|
|||
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) x
|
||||
#endif
|
||||
|
||||
#if defined(NO_SANITIZE) && defined(__GNUC__) &&! defined(__clang__)
|
||||
/* GCC warns about unknown sanitizer, which is annoying. */
|
||||
#undef NO_SANITIZE
|
||||
#define NO_SANITIZE(x, y) \
|
||||
COMPILER_WARNING_PUSH; \
|
||||
COMPILER_WARNING_IGNORED(-Wattributes); \
|
||||
__attribute__((__no_sanitize__(x))) y; \
|
||||
COMPILER_WARNING_POP
|
||||
#endif
|
||||
|
||||
#ifndef NO_SANITIZE
|
||||
# define NO_SANITIZE(x, y) y
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue