Problem with enums and typedefs

From: O'NEEL Bruce (beoneel@acm.org)
Date: Fri Dec 18 1998 - 14:57:22 MET


Hi,
  Given a macro t.C which contains

**********************************************************************
enum myenum {one = 1, two = 2, three = 3};
typedef enum myenum mytype;
mytype myfunc(mytype *d) { return *d;}

mytype myfunc1(mytype d) { return d;}

int myfunc2(int d) {return d;}

int myfunc3(int *d) {return *d;}

**********************************************************************

I'm not sure I see why the call to myfunc fails below.


root [0] .L t.C
root [1] mytype b
root [2] b = one
(enum myenum)1
root [3] b
(mytype)1
root [4] int c
root [5] c = 1
(int)1
root [6] myfunc2(c)
(int)1
root [7] myfunc3(&c)
(int)1
root [8] myfunc1(b)
(mytype)1
root [9] myfunc(&b)
Error: No symbol myfunc(&b) in current scope  FILE:/var/tmp/iaaa002xm LINE:1
*** Interpreter error recovered ***


Thanks very much!

cheers

bruce



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:41 MET