G
Gene
Hello all. Is the initializing assignment below ANSI standard-
conforming?
Is there a way to have the prefix parameters to ... type checked in
such an assignment? E.g. in this case int x in the typedef matched
with int a of foo?
Appreciate the help.
------------
#include <stdio.h>
int foo(int a, int b)
{
return a + b;
}
typedef int (*FUNCTION)(int x, ...);
int main(void)
{
FUNCTION p = (FUNCTION)foo;
printf("%d\n", (*p)(1, 2));
return 0;
}
conforming?
Is there a way to have the prefix parameters to ... type checked in
such an assignment? E.g. in this case int x in the typedef matched
with int a of foo?
Appreciate the help.
------------
#include <stdio.h>
int foo(int a, int b)
{
return a + b;
}
typedef int (*FUNCTION)(int x, ...);
int main(void)
{
FUNCTION p = (FUNCTION)foo;
printf("%d\n", (*p)(1, 2));
return 0;
}