[comp.lang.c] Speaking of hard to find errors...

ts@cup.portal.com (Tim W Smith) (04/18/91)

Here's a code fragment that can cause a lot of grief:

	struct spam {
		...
	}		/* Oops!  Forgot semicolon! */

	function()
	{
		...
	}

The programmer is letting the return type of the function default
to int, but the missing semicolon makes this instead become a
function that returns a struct spam.

Depending on how your compiler implements structure return,
results can range from callers of function getting wrong
return values to a trashed stack.

						Tim Smith