[前][次][番号順一覧][スレッド一覧]

ruby-changes:49408

From: nobu <ko1@a...>
Date: Sun, 31 Dec 2017 21:21:58 +0900 (JST)
Subject: [ruby-changes:49408] nobu:r61524 (trunk): prelude.c.tmpl: get rid of warnings on old gcc

nobu	2017-12-31 21:21:53 +0900 (Sun, 31 Dec 2017)

  New Revision: 61524

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61524

  Log:
    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.

  Modified files:
    trunk/template/prelude.c.tmpl
Index: template/prelude.c.tmpl
===================================================================
--- template/prelude.c.tmpl	(revision 61523)
+++ template/prelude.c.tmpl	(revision 61524)
@@ -139,7 +139,7 @@ prelude_prefix_path(VALUE self) https://github.com/ruby/ruby/blob/trunk/template/prelude.c.tmpl#L139
 
 % 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 https://github.com/ruby/ruby/blob/trunk/template/prelude.c.tmpl#L169
 				      NULL, ISEQ_TYPE_TOP, &optimization));
     rb_ast_dispose(ast);
 }
-#ifdef __GNUC__
+#if defined __GNUC__ && __GNUC__ >= 5
 # pragma GCC diagnostic pop
 #endif
 % end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]