ruby-changes:31032
From: charliesome <ko1@a...>
Date: Tue, 1 Oct 2013 23:45:36 +0900 (JST)
Subject: [ruby-changes:31032] charliesome:r43111 (trunk): * vm_core.h: use __attribute__((unused)) in UNINTIALIZED_VAR on clang
charliesome 2013-10-01 23:45:27 +0900 (Tue, 01 Oct 2013) New Revision: 43111 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43111 Log: * vm_core.h: use __attribute__((unused)) in UNINTIALIZED_VAR on clang 4.0+ instead of just on 4.2. Clang has supported the unused attribute since before version 4, so this should be safe. Modified files: trunk/ChangeLog trunk/vm_core.h Index: ChangeLog =================================================================== --- ChangeLog (revision 43110) +++ ChangeLog (revision 43111) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Oct 1 23:44:00 2013 Charlie Somerville <charliesome@r...> + + * vm_core.h: use __attribute__((unused)) in UNINTIALIZED_VAR on clang + 4.0+ instead of just on 4.2. Clang has supported the unused attribute + since before version 4, so this should be safe. + Tue Oct 1 22:03:48 2013 Nobuyoshi Nakada <nobu@r...> * lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed Index: vm_core.h =================================================================== --- vm_core.h (revision 43110) +++ vm_core.h (revision 43111) @@ -109,7 +109,7 @@ https://github.com/ruby/ruby/blob/trunk/vm_core.h#L109 #define UNLIKELY(x) (x) #endif /* __GNUC__ >= 3 */ -#if (defined(__clang__) && (__clang_major__ == 4 && __clang_minor__ == 2)) +#if (defined(__clang__) && __clang_major__ >= 4) #define UNINITIALIZED_VAR(x) x __attribute__((unused)) #elif defined(__GNUC__) && __GNUC__ >= 3 #define UNINITIALIZED_VAR(x) x = x -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/