C oddity -- language and/or compiler

utzoo!decvax!duke!harpo!npoiv!hou5f!hou5b!hou5c!hou5e!hou5a!mat utzoo!decvax!duke!harpo!npoiv!hou5f!hou5b!hou5c!hou5e!hou5a!mat
Thu Jan 20 08:13:16 AEST 1983


I have some speculation on the behavior of the compilers, but no REAL answers.
Here's another PCC peculiarity that someone discovered recently:
struct
{
	....;
	....
	....
} xyz;
struct	xyz Xyz;
main()
{
	....
	many references to xyz, none to Xyz;
}
The PCC repeorted NO errors, the Ritchie compiler correctly tagged the
	struct xyz Xyz;
as an undefined structure `xyz' .
Speculation: The PCC would have checked the validity of the structure
definition when a reference was found to that structure.
	Perhaps Dennis and Steve Johnson would like to explain this
apparently anomalous behavior?

			hou5a!mat



More information about the Comp.lang.c mailing list