1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
卜部昌平 2020-08-11 11:45:54 +09:00
parent ef2b785b2d
commit 5af983af4f
Notes: git 2020-08-11 16:51:32 +09:00

View file

@ -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%>