[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] error parsing function-pointer type to va_arg

From: Stephan Beal
Subject: Re: [Tinycc-devel] error parsing function-pointer type to va_arg
Date: Fri, 29 Jun 2012 22:16:28 +0200

On Fri, Jun 29, 2012 at 10:12 PM, Rob <address@hidden> wrote:
However this seems fine by the man page:

> The argument type is a type name specified so that the type of a
> pointer to an object that has the specified type can be obtained
> simply by adding a * to type.

So it's a problem with sqlite4 if you want to be picky.

Thanks for that - i'm happy to accept a picky answer :). i have since found that i need to use a typecast for this type of case with gcc, anyway, so i'm refactoring now.
If you want a quick fix, something like this will work:

void *tmp = va_arg(ap, void *);
pMkr->xFactory = tmp;

Here's what i did:


(the green and purple bits in the lower right)

i think that's a different instance, but the same type of problem. Without the typedef (the left side), gcc complains that the types are the same (i have no idea why). The typedef is cleaner, and "should" work with tcc (haven't tried it yet), but i'll be back with more details if it doesn't for some reason ;).


Although the C-standard says that it's implementation defined for converting
between function pointers and non-function pointers.


Tinycc-devel mailing list

----- stephan beal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]