summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-02 06:41:49 (GMT)
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-02 06:41:49 (GMT)
commitdfb24be6c4c57036dee17eb4b517b9be4d30708f (patch)
tree5b1ee2306ef950cb48fe6777a6ae5d47555db01b /template
parent11c19de76b614de53694a5cf7476df9ee0e52c92 (diff)
string literal longer than 509 characters is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/insns_info.inc.tmpl8
1 files changed, 8 insertions, 0 deletions
diff --git a/template/insns_info.inc.tmpl b/template/insns_info.inc.tmpl
index 933eb5a..bf26279 100644
--- a/template/insns_info.inc.tmpl
+++ b/template/insns_info.inc.tmpl
@@ -13,6 +13,13 @@
#define <%=t%> '<%=c%>'
% end
+#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
+static const char *insn_name_info[] = {
+% @insns.each do |insn|
+ "<%= insn.name %>",
+% end
+};
+#else
static const unsigned short insn_name_info_offset[] = {
% insn_name_length = @insns.inject(0) do |ofs, insn|
<%= ofs %>,
@@ -29,6 +36,7 @@ static const char insn_name_info_base[<%=insn_name_length%>] = ""
;
#define insn_name_info insn_name_info_base+insn_name_info_offset
+#endif
static const char insn_operand_info[][8] = {
% @insns.each do |insn|