|
From: Erven R. <erv...@in...> - 2010-01-27 08:31:22
|
For the record: I think Andrea convinced himself that it could be a problem in
our linker.
--
Erven.
Andrea Carlo Ornstein a écrit :
> If I recall it correctly it is an error of ilasm, it does not
> recognize the signature correctly.
> I think I inserted it in novell bugzilla, but I am not sure.
>
> I remember that Dotgnu had the same problem
> and I have a hack in the mono linker for it.
> (the difference is that Dotgnu generates an incomplete assembly that I
> can fix, mono ilasm just breaks)
>
> Andrea
>
>
> On Wed, Jan 20, 2010 at 5:05 PM, Erven Rohou <erv...@in...> wrote:
>> Ciao a tutti,
>>
>> the following piece of code does not link when -DBUG is passed (ie when the
>> vararg method is static): "Error: Can't find method: foo"
>> This vaguely reminds me something. Is it just me? Do you also remember a problem
>> like this?
>>
>> [Note: this is cc.c-torture/execute/va-arg-11.c]
>>
>> Thanks,
>>
>> --
>> Erven.
>>
>>
>>
>> #include <stdarg.h>
>> #include <stdlib.h>
>>
>> #ifdef BUG
>> static
>> #endif
>> int foo (int a, ...)
>> {
>> va_list va;
>> int i, res;
>>
>> va_start (va, a);
>>
>> for (i = 0; i < 4; ++i)
>> (void) va_arg (va, int);
>>
>> res = va_arg (va, int);
>> va_end (va);
>> return res;
>> }
>>
>> int
>> main (void)
>> {
>> if (foo (5, 4, 3, 2, 1, 0))
>> abort ();
>> exit (0);
>> }
|