FreeBSD Bugzilla – Attachment 224976 Details for
Bug 255910
lang/ruby26 lang/ruby27: Fix clang 12 -Wcompound-token-split-by-macro warning in ruby.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix -Wcompound-token-split-by-macro warning in ruby26's ruby.h
lang__ruby26-fix-compound-token-warning-1.diff (text/plain), 1.33 KB, created by
Dimitry Andric
on 2021-05-15 19:20:31 UTC
(
hide
)
Description:
Fix -Wcompound-token-split-by-macro warning in ruby26's ruby.h
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2021-05-15 19:20:31 UTC
Size:
1.33 KB
patch
obsolete
>diff --git a/lang/ruby26/files/patch-include_ruby_ruby.h b/lang/ruby26/files/patch-include_ruby_ruby.h >new file mode 100644 >index 000000000000..b165854810ea >--- /dev/null >+++ b/lang/ruby26/files/patch-include_ruby_ruby.h >@@ -0,0 +1,29 @@ >+--- include/ruby/ruby.h.orig 2021-04-05 11:48:34 UTC >++++ include/ruby/ruby.h >+@@ -1807,12 +1807,14 @@ VALUE rb_sym2str(VALUE); >+ VALUE rb_to_symbol(VALUE name); >+ VALUE rb_check_symbol(volatile VALUE *namep); >+ >+-#define RUBY_CONST_ID_CACHE(result, str) \ >+- { \ >++#define RUBY_CONST_ID_CACHE_NB(result, str) \ >+ static ID rb_intern_id_cache; \ >+ if (!rb_intern_id_cache) \ >+ rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); \ >+- result rb_intern_id_cache; \ >++ result rb_intern_id_cache; >++#define RUBY_CONST_ID_CACHE(result, str) \ >++ { \ >++ RUBY_CONST_ID_CACHE_NB(result, str) \ >+ } >+ #define RUBY_CONST_ID(var, str) \ >+ do RUBY_CONST_ID_CACHE((var) =, (str)) while (0) >+@@ -1823,7 +1825,7 @@ VALUE rb_check_symbol(volatile VALUE *namep); >+ * since gcc-2.7.2.3 at least. */ >+ #define rb_intern(str) \ >+ (__builtin_constant_p(str) ? \ >+- __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \ >++ __extension__ ({RUBY_CONST_ID_CACHE_NB((ID), (str))}) : \ >+ rb_intern(str)) >+ #define rb_intern_const(str) \ >+ (__builtin_constant_p(str) ? \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255910
: 224976 |
224977