s5last No Longer Dumps Core!

Doug Gwyn gwyn at smoke.brl.mil
Sun Jun 30 22:55:44 AEST 1991


In article <1991Jun30.010604.8185 at mccc.edu> pjh at mccc.edu (Pete Holsberg) writes:
>I don't understand how legitimate C code doesn't behave under this compiler
>or that unless the compilers are buggy.

Obviously not.

Only a perfectly portable program could be used to test compilers like this.
There are VERY few perfectly portable programs, even among those that were
intended to be.  The number of things that could go wrong are legion, but
since you asked for an example, here's just one on the thousands that I've
seen:

	int test(arg) int arg; {int ok; if(arg < 0) ok = 0; else ok = 1;}

This function works on some systems using some compilers but not others.
I leave it to you to figure out why (for both situations).  Please don't
post your guesses here!



More information about the Comp.unix.questions mailing list