This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libobjc] fix to nil_method


Stan Shebs <shebs@apple.com> writes:

> The patch basically makes nil_method look non-variadic to the runtime,
> and seems adequate as a workaround, since it would be pretty hard to
> rewrite the codegen/runtime machinery to not fake up function
> signatures.  So let's go with the patch, adding an explanatory
> comment so that some energetic person doesn't come along and add
> the signature back later. :-)

Ok, here's what I've just commit on behalf of Jan - after testing on
both i686-linux and x86_64-linux,

Andreas

2002-09-10  Jan Hubicka  <jh@suse.cz>

	* nil_method.c (nil_method): No longer varardic.

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
+   in a way that does not setup the variable arguments correctly.  Some Architectures
+   that have special arg calling conventions like x86-64 do need every function with
+   variable arguments called the correct way.  */
 id
-nil_method (id receiver, SEL op __attribute__ ((__unused__)), ...)
+nil_method (id receiver, SEL op __attribute__ ((__unused__)))
 {
   return receiver;
 }

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]