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

ruby-changes:34124

From: nobu <ko1@a...>
Date: Wed, 28 May 2014 14:39:53 +0900 (JST)
Subject: [ruby-changes:34124] nobu:r46205 (trunk): eval_intern.h: suppress warning by gcc 4.6

nobu	2014-05-28 14:39:45 +0900 (Wed, 28 May 2014)

  New Revision: 46205

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46205

  Log:
    eval_intern.h: suppress warning by gcc 4.6
    
    * eval_intern.h (VAR_FROM_MEMORY, VAR_INITIALIZED): gcc 4.6 also
      seems to warn false maybe-uninitialized.

  Modified files:
    trunk/eval_intern.h
Index: eval_intern.h
===================================================================
--- eval_intern.h	(revision 46204)
+++ eval_intern.h	(revision 46205)
@@ -137,7 +137,7 @@ LONG WINAPI rb_w32_stack_overflow_handle https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L137
 #define PUSH_TAG() TH_PUSH_TAG(GET_THREAD())
 #define POP_TAG()      TH_POP_TAG()
 
-#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ == 7 || __GNUC_MINOR__ == 8)
+#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8)
 # define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var))
 # define VAR_INITIALIZED(var) ((var) = VAR_FROM_MEMORY(var))
 #else

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

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