1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-11 16:07:04 +00:00
cc65/test/ref/cc65090726.c
2022-04-17 16:07:52 +02:00

49 lines
922 B
C

/*
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!
*/
#include "common.h"
struct Record {
struct Record *PtrComp;
int x;
};
typedef struct Record RecordType;
typedef RecordType *RecordPtr;
void Proc3(RecordPtr *PtrParOut)
{
/* whatever */
}
void Proc1(RecordPtr PtrParIn)
{
#define NextRecord (*(PtrParIn->PtrComp))
Proc3((RecordPtr *)NextRecord.PtrComp);
Proc3(&NextRecord.PtrComp);
Proc3(&PtrParIn->PtrComp->PtrComp);
#ifdef CAST_STRUCT_PTR
Proc3((RecordPtr *) PtrParIn->PtrComp->PtrComp);
Proc3((RecordPtr *) (*(PtrParIn->PtrComp)).PtrComp);
Proc3((RecordPtr *) NextRecord.PtrComp);
#else
Proc3(PtrParIn->PtrComp->PtrComp);
Proc3((*(PtrParIn->PtrComp)).PtrComp);
Proc3(NextRecord.PtrComp);
#endif
#undef NextRecord
}
int main(void)
{
printf("it works :)\n");
return 0;
}