aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-02 06:41:49 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-02 06:41:49 +0000
commitcbd5596ca8f2fccfe1a2444c0e9101695bc6cac1 (patch)
tree5b1ee2306ef950cb48fe6777a6ae5d47555db01b /template
parent9e45aab5490d4c3e144de18a7fa2b9dd3b2f1151 (diff)
downloadruby-cbd5596ca8f2fccfe1a2444c0e9101695bc6cac1.tar.gz
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 933eb5ae0e..bf26279204 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|