summaryrefslogtreecommitdiff
path: root/template/prelude.c.tmpl
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-08-11 11:45:54 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-08-11 16:51:07 +0900
commit5af983af4f7722845f73b426cb33b7ba91a1c47c (patch)
treec8dfa19656597918854c4e2bf54c43cb6a745378 /template/prelude.c.tmpl
parentef2b785b2dd188196e91dd7084a4ac4da42228f2 (diff)
template/prelude.c.tmpl: suppress clang-12 warning
Clang 12 warns "suspicious concatenation of string literals in an array initialization", which is rather annoying than useful in this context.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3405
Diffstat (limited to 'template/prelude.c.tmpl')
-rw-r--r--template/prelude.c.tmpl6
1 files changed, 6 insertions, 0 deletions
diff --git a/template/prelude.c.tmpl b/template/prelude.c.tmpl
index 73d35fc282..0ba6b0ba4b 100644
--- a/template/prelude.c.tmpl
+++ b/template/prelude.c.tmpl
@@ -81,6 +81,10 @@ Prelude.new(output, ARGV, vpath).instance_eval do
#include "ruby/ruby.h"
#include "vm_core.h"
+COMPILER_WARNING_PUSH
+#if __has_warning("-Wstring-concatenation")
+COMPILER_WARNING_IGNORED(-Wstring-concatenation)
+#endif
% preludes = @preludes.values.sort
% preludes.each {|i, prelude, lines, sub|
@@ -116,6 +120,8 @@ static const struct {
};
% }
+COMPILER_WARNING_POP
+
% if @have_sublib
#define PRELUDE_COUNT <%=preludes.size%>