зеркало из https://github.com/github/ruby.git
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:
Родитель
ef2b785b2d
Коммит
5af983af4f
|
@ -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%>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче