'struct' parameters

chris at umcp-cs.UUCP chris at umcp-cs.UUCP
Wed Feb 22 19:48:14 AEST 1984


	From: decot at cwruecmp.UUCP (Dave Decot)

	Chris Torek says:


		struct { int i, j, k; } foo = { 1, 2, 3 };

		main () { printf ("%d %d %d\n", foo); }

	    is just plain illegal.
	This code is NOT illegal, nor is it illegal to pass unions.

It is *syntactically* correct.  It is *semantically* wrong.  That,
as far as I am concerned, makes it illegal.  I also consider passing
0 instead of (type *)0 as a paramter to be illegal.  Perhaps "bogus"
is a better word.
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris.umcp-cs at CSNet-Relay

More information about the Comp.lang.c mailing list