mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Suppress gcc 15 unterminated-string-initialization warnings
This commit is contained in:
parent
545aafa2a2
commit
b42afa1dbc
12 changed files with 59 additions and 8 deletions
|
@ -22,7 +22,8 @@ ops = ids[:token_op].uniq {|id, op, token| token && op}
|
|||
|
||||
static const struct {
|
||||
unsigned short token;
|
||||
const char name[3], term;
|
||||
RBIMPL_ATTR_NONSTRING() const char name[3];
|
||||
const char term;
|
||||
} op_tbl[] = {
|
||||
% ops.each do |_id, op, token|
|
||||
% next unless token
|
||||
|
|
|
@ -88,6 +88,7 @@ Prelude.new(output, ARGV, vpath).instance_eval do
|
|||
#include "internal/ruby_parser.h"
|
||||
#include "internal/warnings.h"
|
||||
#include "iseq.h"
|
||||
#include "ruby/internal/attr/nonstring.h"
|
||||
#include "ruby/ruby.h"
|
||||
#include "vm_core.h"
|
||||
|
||||
|
@ -107,12 +108,12 @@ static const struct {
|
|||
% size += line.size
|
||||
% next
|
||||
% end
|
||||
char L<%=beg%><%=%>[<%=size%><%=%>]; /* <%=beg+1%>..<%=n%> */
|
||||
RBIMPL_ATTR_NONSTRING() char L<%=beg%><%=%>[<%=size%><%=%>]; /* <%=beg+1%>..<%=n%> */
|
||||
% size = line.size
|
||||
% beg = n
|
||||
% }
|
||||
% if size > 0
|
||||
char L<%=beg%><%=%>[<%=size%><%=%>]; /* <%=beg+1%>..<%=lines.size+1%> */
|
||||
RBIMPL_ATTR_NONSTRING() char L<%=beg%><%=%>[<%=size%><%=%>]; /* <%=beg+1%>..<%=lines.size+1%> */
|
||||
% end
|
||||
} prelude_code<%=i%><%=%> = {
|
||||
% size = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue