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

glibc2.1 programming question



Hello,

under glinc2.0 worked the following:

typedef union {
   char  *s;
   int    i;
   double d;
} C_VALUE;

int func(C_VALUE val);

void main(void)
{
  char *s;

  func(s);
}

After upgrading I get:

test.c: In function `main':
test.c: incompatible type for argument 1 of `func'

It is clear that my call is not really clean, but *how* to do it
clean.  Possibly an explicite type casting would help, but it is
not very clean.  Do I have to ship a C_VALUE union variable are
there other possibilities.

Kind regards

        Andreas.


Reply to: