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

ruby-changes:73737

From: Shugo <ko1@a...>
Date: Mon, 26 Sep 2022 14:48:05 +0900 (JST)
Subject: [ruby-changes:73737] a8ad22d926 (master): Suppress a warning on clang

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

From a8ad22d926f2c2bc652ce030ccbe2774b13a4b2f Mon Sep 17 00:00:00 2001
From: Shugo Maeda <shugo@r...>
Date: Mon, 26 Sep 2022 14:44:54 +0900
Subject: Suppress a warning on clang

The following warning appears without this fix:

```
parse.y:78:1: warning: unknown warning group '-Wpsabi', ignored
      [-Wunknown-warning-option]
RBIMPL_WARNING_IGNORED(-Wpsabi)
^
./include/ruby/internal/warning_push.h:103:39: note: expanded from macro
      'RBIMPL_WARNING_IGNORED'
                                      ^
./include/ruby/internal/warning_push.h:99:39: note: expanded from macro
      'RBIMPL_WARNING_PRAGMA2'
                                      ^
./include/ruby/internal/warning_push.h:98:39: note: expanded from macro
      'RBIMPL_WARNING_PRAGMA1'
                                      ^
./include/ruby/internal/warning_push.h:97:39: note: expanded from macro
      'RBIMPL_WARNING_PRAGMA0'
                                      ^
<scratch space>:49:27: note: expanded from here
 clang diagnostic ignored "-Wpsabi"
                          ^
1 warning generated.
```
---
 parse.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse.y b/parse.y
index 4f0aa6a6ce..b16dc35b88 100644
--- a/parse.y
+++ b/parse.y
@@ -70,7 +70,7 @@ struct lex_context { https://github.com/ruby/ruby/blob/trunk/parse.y#L70
     BITFIELD(enum shareability, shareable_constant_value, 2);
 };
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__clang__)
 // Suppress "parameter passing for argument of type 'struct
 // lex_context' changed" notes.  `struct lex_context` is file scope,
 // and has no ABI compatibility issue.
-- 
cgit v1.2.1


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

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