ruby-changes:31420
From: nobu <ko1@a...>
Date: Fri, 1 Nov 2013 16:37:32 +0900 (JST)
Subject: [ruby-changes:31420] nobu:r43499 (trunk): load.c: suppress warning
nobu 2013-11-01 16:37:27 +0900 (Fri, 01 Nov 2013) New Revision: 43499 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43499 Log: load.c: suppress warning * load.c (rb_load_internal): split to suppress false "clobbered" warning by gcc 4.4.5. Modified files: trunk/load.c Index: load.c =================================================================== --- load.c (revision 43498) +++ load.c (revision 43499) @@ -558,16 +558,15 @@ rb_provide(const char *feature) https://github.com/ruby/ruby/blob/trunk/load.c#L558 NORETURN(static void load_failed(VALUE)); -static void -rb_load_internal(VALUE fname, int wrap) +static inline void +rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap) { int state; - rb_thread_t *th = GET_THREAD(); volatile VALUE wrapper = th->top_wrapper; volatile VALUE self = th->top_self; volatile int loaded = FALSE; volatile int mild_compile_error; -#if !defined __GNUC__ || (__GNUC__ == 4 && __GNUC_MINOR__ == 4) +#if !defined __GNUC__ rb_thread_t *volatile th0 = th; #endif @@ -599,7 +598,7 @@ rb_load_internal(VALUE fname, int wrap) https://github.com/ruby/ruby/blob/trunk/load.c#L598 } POP_TAG(); -#if !defined __GNUC__ || (__GNUC__ == 4 && __GNUC_MINOR__ == 4) +#if !defined __GNUC__ th = th0; fname = RB_GC_GUARD(fname); #endif @@ -621,6 +620,12 @@ rb_load_internal(VALUE fname, int wrap) https://github.com/ruby/ruby/blob/trunk/load.c#L620 } } +static void +rb_load_internal(VALUE fname, int wrap) +{ + rb_load_internal0(GET_THREAD(), fname, wrap); +} + void rb_load(VALUE fname, int wrap) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/