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

ruby-changes:49751

From: ngoto <ko1@a...>
Date: Tue, 16 Jan 2018 14:49:06 +0900 (JST)
Subject: [ruby-changes:49751] ngoto:r61869 (trunk): fix macro argument names inconsistency

ngoto	2018-01-16 14:49:01 +0900 (Tue, 16 Jan 2018)

  New Revision: 61869

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

  Log:
    fix macro argument names inconsistency
    
    * include/ruby/defines.h (RUBY_ALIGNAS): Fix macro definition.
      Fix compile error with Fujitsu C Compiler (fcc) on Solaris.
    
    * include/ruby/defines.h (RUBY_ALIGNOF): Fix macro argument name.
      Fix compile error with fcc and Oracle Solaris Studio 12.4 on Solaris.

  Modified files:
    trunk/include/ruby/defines.h
Index: include/ruby/defines.h
===================================================================
--- include/ruby/defines.h	(revision 61868)
+++ include/ruby/defines.h	(revision 61869)
@@ -373,7 +373,7 @@ void rb_ia64_flushrs(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L373
 #endif
 
 #ifndef RUBY_ALIGNAS
-#define RUBY_ALIGNAS(x) y
+#define RUBY_ALIGNAS(x) /* x */
 #endif
 
 #ifdef RUBY_ALIGNOF
@@ -383,7 +383,7 @@ void rb_ia64_flushrs(void); https://github.com/ruby/ruby/blob/trunk/include/ruby/defines.h#L383
 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
 #define RUBY_ALIGNOF _Alignof
 #else
-#define RUBY_ALIGNOF(x) ((size_t)offsetof(struct { char f1; type f2; }, f2))
+#define RUBY_ALIGNOF(type) ((size_t)offsetof(struct { char f1; type f2; }, f2))
 #endif
 
 #define NORETURN_STYLE_NEW 1

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

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