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

ruby-changes:57393

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 30 Aug 2019 11:22:36 +0900 (JST)
Subject: [ruby-changes:57393] 卜部昌平: 43ab88c737 (master): Workaround for https://reviews.llvm.org/D25824

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

From 43ab88c73706f4ffca2d01b149f5d7092b46000b 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: Fri, 30 Aug 2019 11:20:43 +0900
Subject: Workaround for https://reviews.llvm.org/D25824

This changeset make it possible to use very old clang.

diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index d9ea79d..301bf52 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -1007,7 +1007,7 @@ RUBY_SYMBOL_EXPORT_END https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L1007
 #if __has_attribute(transparent_union) && __has_attribute(unused) && __has_attribute(weakref) && __has_attribute(nonnull)
 __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_idm3(VALUE,ID,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_idm2(VALUE,ID,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_idm1(VALUE,ID,VALUE(*)(int,union __attribute__((__transparent_union__)){VALUE*x;const VALUE*y;},VALUE),int);
+__attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_idm1(VALUE,ID,VALUE(*)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_id0 (VALUE,ID,VALUE(*)(VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_id1 (VALUE,ID,VALUE(*)(VALUE,VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))static void rb_define_method_id2 (VALUE,ID,VALUE(*)(VALUE,VALUE,VALUE),int);
@@ -1048,7 +1048,7 @@ __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__(3)))sta https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L1048
 
 __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_methodm3(VALUE,const char*,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_methodm2(VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_methodm1(VALUE,const char*,VALUE(*)(int,union __attribute__((__transparent_union__)){VALUE*x;const VALUE*y;},VALUE),int);
+__attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_methodm1(VALUE,const char*,VALUE(*)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_method0 (VALUE,const char*,VALUE(*)(VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_method1 (VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__(2,3)))static void rb_define_protected_method2 (VALUE,const char*,VALUE(*)(VALUE,VALUE,VALUE),int);
@@ -1089,7 +1089,7 @@ __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__( https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L1089
 
 __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_methodm3(VALUE,const char*,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_methodm2(VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_methodm1(VALUE,const char*,VALUE(*)(int,union __attribute__((__transparent_union__)){VALUE*x;const VALUE*y;},VALUE),int);
+__attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_methodm1(VALUE,const char*,VALUE(*)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_method0 (VALUE,const char*,VALUE(*)(VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_method1 (VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2,3)))static void rb_define_private_method2 (VALUE,const char*,VALUE(*)(VALUE,VALUE,VALUE),int);
@@ -1130,7 +1130,7 @@ __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__(2, https://github.com/ruby/ruby/blob/trunk/include/ruby/intern.h#L1130
 
 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_methodm3(VALUE,const char*,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_methodm2(VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_methodm1(VALUE,const char*,VALUE(*)(int,union __attribute__((__transparent_union__)){VALUE*x;const VALUE*y;},VALUE),int);
+__attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_methodm1(VALUE,const char*,VALUE(*)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_method0 (VALUE,const char*,VALUE(*)(VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_method1 (VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__(2,3)))static void rb_define_singleton_method2 (VALUE,const char*,VALUE(*)(VALUE,VALUE,VALUE),int);
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 29f7f1f..8764443 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -2693,7 +2693,7 @@ RUBY_SYMBOL_EXPORT_END https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2693
 #if __has_attribute(transparent_union) && __has_attribute(unused) && __has_attribute(weakref) && __has_attribute(nonnull)
 __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_methodm3(VALUE,const char*,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_methodm2(VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_methodm1(VALUE,const char*,VALUE(*)(int,union __attribute__((__transparent_union__)){VALUE*x;const VALUE*y;},VALUE),int);
+__attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_methodm1(VALUE,const char*,VALUE(*)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_method0 (VALUE,const char*,VALUE(*)(VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_method1 (VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))static void rb_define_method2 (VALUE,const char*,VALUE(*)(VALUE,VALUE,VALUE),int);
@@ -2736,7 +2736,7 @@ __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__(2,3)))stat https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2736
 
 __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_functionm3(VALUE,const char*,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_functionm2(VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_functionm1(VALUE,const char*,VALUE(*)(int,union __attribute__((__transparent_union__)){VALUE*x;const VALUE*y;},VALUE),int);
+__attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_functionm1(VALUE,const char*,VALUE(*)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_function0 (VALUE,const char*,VALUE(*)(VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_function1 (VALUE,const char*,VALUE(*)(VALUE,VALUE),int);
 __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2,3)))static void rb_define_module_function2 (VALUE,const char*,VALUE(*)(VALUE,VALUE,VALUE),int);
@@ -2777,7 +2777,7 @@ __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__(2 https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2777
 
 __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__(1,2)))static void rb_define_global_functionm3(const char*,VALUE(*)(ANYARGS),int);
 __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__(1,2)))static void rb_define_global_functionm2(const char*,VALUE(*)(VALUE,VALUE),int);
-__attribute__((__unused__,__we (... truncated)

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

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