[前][次][番号順一覧][スレッド一覧]

ruby-changes:60850

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 21 Apr 2020 13:08:52 +0900 (JST)
Subject: [ruby-changes:60850] 735e035bf5 (master): __GNUC__ is too lax

https://git.ruby-lang.org/ruby.git/commit/?id=735e035bf5

From 735e035bf54e018fa629f6601d882fc0b097e1fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Sat, 18 Apr 2020 05:53:10 +0900
Subject: __GNUC__ is too lax

Ditto for 4b853932eaa7fa4acf8a0f0c9b7c695bb4f5e76d

diff --git a/internal/sanitizers.h b/internal/sanitizers.h
index 81ee7e3..628c225 100644
--- a/internal/sanitizers.h
+++ b/internal/sanitizers.h
@@ -46,7 +46,7 @@ https://github.com/ruby/ruby/blob/trunk/internal/sanitizers.h#L46
 # define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) x
 #endif
 
-#if defined(NO_SANITIZE) && defined(__GNUC__) &&! defined(__clang__)
+#if defined(NO_SANITIZE) && RUBY3_COMPILER_IS(GCC)
 /* GCC warns about unknown sanitizer, which is annoying. */
 # include "internal/warnings.h"
 # undef NO_SANITIZE
diff --git a/process.c b/process.c
index efe9984..0d0b466 100644
--- a/process.c
+++ b/process.c
@@ -3958,7 +3958,7 @@ disable_child_handler_fork_child(struct child_handler_disabler_state *old, char https://github.com/ruby/ruby/blob/trunk/process.c#L3958
 }
 
 COMPILER_WARNING_PUSH
-#ifdef __GNUC__
+#if __has_warning("-Wdeprecated-declarations") || RUBY3_COMPILER_IS(GCC)
 COMPILER_WARNING_IGNORED(-Wdeprecated-declarations)
 #endif
 static rb_pid_t
@@ -4076,7 +4076,7 @@ rb_fork_async_signal_safe(int *status, https://github.com/ruby/ruby/blob/trunk/process.c#L4076
 }
 
 COMPILER_WARNING_PUSH
-#ifdef __GNUC__
+#if __has_warning("-Wdeprecated-declarations") || RUBY3_COMPILER_IS(GCC)
 COMPILER_WARNING_IGNORED(-Wdeprecated-declarations)
 #endif
 rb_pid_t
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]