From 5af983af4f7722845f73b426cb33b7ba91a1c47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Tue, 11 Aug 2020 11:45:54 +0900 Subject: [PATCH] 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. --- template/prelude.c.tmpl | 6 ++++++ 1 file changed, 6 insertions(+) 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%>