#85 OBC: Invalid 'Illegal type for argument

OnBoard_C
open
nobody
OnBoard C (33)
5
2006-02-26
2006-02-26
GoldenUrg
No

typedef struct asub{
int a;
} Asub;

typedef struct bsub{
Asub* ptr;
} Bsub;

#define indirect(this) _indirect((this))
void _indirect(Asub* this){
}

void main(){
Bsub* this;
Asub* nptr = this->ptr;
indirect(nptr); // ok
_indirect(this->ptr); // ok
_indirect((this->ptr)); // ok
indirect(this->ptr); // fails
}

Discussion