This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libobjc] fix to nil_method
- From: Nicola Pero <nicola at brainstorm dot co dot uk>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: Stan Shebs <shebs at apple dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Sep 2002 13:38:51 +0100 (BST)
- Subject: Re: [libobjc] fix to nil_method
> Index: libobjc/nil_method.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/libobjc/nil_method.c,v
> retrieving revision 1.4
> diff -u -p -r1.4 nil_method.c
> --- libobjc/nil_method.c 2 Jul 2002 19:42:38 -0000 1.4
> +++ libobjc/nil_method.c 10 Sep 2002 07:56:57 -0000
> @@ -29,8 +29,12 @@ Boston, MA 02111-1307, USA. */
>
> #include "runtime.h"
>
> +/* nil_method is declared with variable arguments but the runtime calls it
I think you should change the declaration as well - there is no reason why
a function/method which does *not* accept variable number of args should
be declared to do so - it has been confusing a *lot* of people.
Then, add a cast of it to IMP in sendmsg.c, whenever it is returned as an
IMP ... the cast is just to prevent compiler warnings and has no other
effects.
If it's Ok with Stan, I'll also cut&paste into the code some more verbose
comments from one of my overly verbose emails. :-)