scope of a structure tag

holub at violet.berkeley.edu holub at violet.berkeley.edu
Sat Jan 7 08:53:16 AEST 1989


I'm confused about the scope of a structure tag. Is the following legal
in ANSI C:

	struct tag1
	{
		struct tag2
		{
			int a, b;	
		} x;
	}

	struct tag3
	{
		struct tag2 y;
	}

or does the inner structure have to be redefined in tag3?

	- Allen Holub
	 holub at violet.berkeley.edu
	 ...!ucbvax!violet!holub



More information about the Comp.std.c mailing list