call to revolt

Sean Eric Fagan sef at kithrup.COM
Sat Jun 29 08:01:28 AEST 1991


I've got a bone to pick with X3J11, as well!  I had some code that worked
*fine* with my *K&R* compiler, but doesn't work with the ANSI compiler I
got.

The following *used* to work, but now doesn't!  I can't understand *how*
ANSI could even *begin* to define a language that *breaks* existing code!

	int foo(a, b) int a, b; {
		int tmp;
		/* some stuff */
		tmp = a*b;
	}

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

I think we should all start a letter-writing campaign to protest how X3J11
*broke* C!

----
Editor's note:  the posted example is true, only the code has been
simplified to protect the innocent.  A certain version of Microsoft C for
Xenix '386 performed the multiply, and left the result in %eax.  A certain
version of GCC, seeing that the result was not returned, did not perform the
multiplication, therefore a random value was left in %eax.  The author of
the code is now serving maximum sentence in a COBOL shop.
----

-- 
Sean Eric Fagan  | "What *does* that 33 do?  I have no idea."
sef at kithrup.COM  |           -- Chris Torek
-----------------+              (torek at ee.lbl.gov)
Any opinions expressed are my own, and generally unpopular with others.



More information about the Comp.std.c mailing list