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

ruby-changes:27803

From: nobu <ko1@a...>
Date: Thu, 21 Mar 2013 13:51:08 +0900 (JST)
Subject: [ruby-changes:27803] nobu:r39855 (trunk): vm_core.h: suppress warnings

nobu	2013-03-21 13:50:52 +0900 (Thu, 21 Mar 2013)

  New Revision: 39855

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

  Log:
    vm_core.h: suppress warnings
    
    * vm_core.h (UNINITIALIZED_VAR): suppress warnings by clang 4.2.
      [ruby-core:51742] [Bug #7756]

  Modified files:
    trunk/ChangeLog
    trunk/vm_core.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39854)
+++ ChangeLog	(revision 39855)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Mar 21 13:50:46 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* vm_core.h (UNINITIALIZED_VAR): suppress warnings by clang 4.2.
+	  [ruby-core:51742] [Bug #7756]
+
 Thu Mar 21 07:34:00 2013  Zachary Scott  <zachary@z...>
 
 	* ext/date/date_core.c: Typo in Date::MONTHNAMES by Matt Gauger
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 39854)
+++ vm_core.h	(revision 39855)
@@ -115,7 +115,9 @@ https://github.com/ruby/ruby/blob/trunk/vm_core.h#L115
 #define UNLIKELY(x) (x)
 #endif /* __GNUC__ >= 3 */
 
-#if __GNUC__ >= 3
+#if (defined(__clang__) && (__clang_major__ == 4 && __clang_minor__ == 2))
+#define UNINITIALIZED_VAR(x) x __attribute__((unused))
+#elif defined(__GNUC__) && __GNUC__ >= 3
 #define UNINITIALIZED_VAR(x) x = x
 #else
 #define UNINITIALIZED_VAR(x) x

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

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