summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-31 12:21:53 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-31 12:21:53 (GMT)
commitd0afbff3b047755f6a74446185cf08b5618387a0 (patch)
treef4ffefdc887512e0c26918fee13693af87685bf6 /template
parent457521574c4765911c6b486b2b08170dcfd235cc (diff)
prelude.c.tmpl: get rid of warnings on old gcc
* template/prelude.c.tmpl: ignore missing-field-initializers on old gcc, e.g. 4.4, which does not support pushing/popping diagnostics. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/prelude.c.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/template/prelude.c.tmpl b/template/prelude.c.tmpl
index 11ec71f..3cf74ed 100644
--- a/template/prelude.c.tmpl
+++ b/template/prelude.c.tmpl
@@ -139,7 +139,7 @@ prelude_prefix_path(VALUE self)
% unless preludes.empty?
#define PRELUDE_STR(n) rb_usascii_str_new_static(prelude_##n.L0, sizeof(prelude_##n))
-#ifdef __GNUC__
+#if defined __GNUC__ && __GNUC__ >= 5
# pragma GCC diagnostic push
# pragma GCC diagnostic error "-Wmissing-field-initializers"
#endif
@@ -169,7 +169,7 @@ prelude_eval(VALUE code, VALUE name, int line)
NULL, ISEQ_TYPE_TOP, &optimization));
rb_ast_dispose(ast);
}
-#ifdef __GNUC__
+#if defined __GNUC__ && __GNUC__ >= 5
# pragma GCC diagnostic pop
#endif
% end