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

ruby-changes:18732

From: kosaki <ko1@a...>
Date: Wed, 2 Feb 2011 00:34:09 +0900 (JST)
Subject: [ruby-changes:18732] Ruby:r30757 (trunk): * include/ruby/st.h (st_table): Added comment why we need __extension__.

kosaki	2011-02-02 00:32:08 +0900 (Wed, 02 Feb 2011)

  New Revision: 30757

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

  Log:
    * include/ruby/st.h (st_table): Added comment why we need __extension__.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/st.h

Index: include/ruby/st.h
===================================================================
--- include/ruby/st.h	(revision 30756)
+++ include/ruby/st.h	(revision 30757)
@@ -79,6 +79,15 @@
     st_index_t num_bins;
     unsigned int entries_packed : 1;
 #ifdef __GNUC__
+    /*
+     * C spec says,
+     *   A bit-field shall have a type that is a qualified or unqualified
+     *   version of _Bool, signed int, unsigned int, or some other
+     *   implementation-defined type. It is implementation-defined whether
+     *   atomic types are permitted.
+     * In short, long and long long bit-field are implementation-defined
+     * feature. Therefore we want to supress a warning explicitly.
+     */
     __extension__
 #endif
     st_index_t num_entries : ST_INDEX_BITS - 1;
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30756)
+++ ChangeLog	(revision 30757)
@@ -1,3 +1,7 @@
+Wed Feb  2 00:30:43 2011  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* include/ruby/st.h (st_table): Added comment why we need __extension__.
+
 Tue Feb  1 20:45:44 2011  Tanaka Akira  <akr@f...>
 
 	* enc/encdb.c: parenthesize macro arguments.

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

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