Circular references in declerations

Joe Grant grant at cft.philips.nl
Tue Feb 27 21:52:57 AEST 1990



Calling all C gurus,

	A colleague of mine has run into the following problem.
	He needs to use the following declarations:

	typedef union {
			int *a;
			float *e;
			X *x;
		} Y

	typedef struct {
			int *d;
			.
			.
			.
			Y *y;
		}

	and neither of us are sure how the circular references of Y and X 
	will be interpreted. To the best of my knowledge C promises nothing 
	with regard to circular references, however I'm no guru so I told him
	that I'd see what the net thinks of the problem. The code needs to
	be portable, and I have a funny feeling that this may be compiler 
	dependent, in which case another solution will need to be found.
	
	If any of you know what should happen, or have any ideas or comments 
	I'd appreciate hearing from you

	Joe Grant


-- 
Joe Grant,                       Telex     : 35000 phtc nl/nlmtfarr
Philips B.V., Building HKJ-p833, Telefax   : (31.40.7)37222
P.O. Box 218, 5600 MD Eindhoven, E-mail    : grant at nlccl.cft.philips.nl
The Netherlands.                 Telephone : (31.40.7)34382



More information about the Comp.lang.c mailing list