On Tue, Nov 25, 2014 at 11:09 AM, Uros Bizjak <ubiz...@gmail.com> wrote: > Hello! > > Recently, gcc bootstrap started to emit following warnings when > building libobjc: > > libobjc/sendmsg.c:338:13: warning: ‘get_implementation’ is static but > used in inline function ‘get_imp’ which is not static > libobjc/sendmsg.c:335:15: warning: ‘sarray_get_safe’ is static but > used in inline function ‘get_imp’ which is not static > libobjc/sendmsg.c:143:21: warning: ‘__objc_word_forward’ is static but > used in inline function ‘__objc_get_forward_imp’ which is not static > libobjc/sendmsg.c:141:21: warning: ‘__objc_double_forward’ is static > but used in inline function ‘__objc_get_forward_imp’ which is not > static > libobjc/sendmsg.c:139:21: warning: ‘__objc_block_forward’ is static > but used in inline function ‘__objc_get_forward_imp’ which is not > static
This patch is incorrect as get_imp is exported from libobjc.so. See libobjc.def. I would rather use -std=gnu90 to compile these source files as you are changing the exported symbols. This also fixes bug 63863. Thanks, Andrew Pinski > > > 2014-11-25 Uros Bizjak <ubiz...@gmail.com> > > * sendmsg.c (get_imp): Declare as static inline. > (__objc_get_forward_imp): Ditto. > > Bootstrapped on x86_64-linux-gnu. > > OK for mainline? > > Uros. > > Index: sendmsg.c > =================================================================== > --- sendmsg.c (revision 218056) > +++ sendmsg.c (working copy) > @@ -105,7 +105,7 @@ > id nil_method (id, SEL); > > /* Given a selector, return the proper forwarding implementation. */ > -inline > +static inline > IMP > __objc_get_forward_imp (id rcv, SEL sel) > { > @@ -320,7 +320,7 @@ > return res; > } > > -inline > +static inline > IMP > get_imp (Class class, SEL sel) > {