Constant overflow

Frank Adams franka at mmintl.UUCP
Fri Mar 4 07:27:37 AEST 1988


[Not food]

Try this one on your favorite C compiler.  So far, every one I've tried
(including lint) has had no complaint:

	long i = 9876543210L;

(The problem, of course, is that that number doesn't fit in 32 bits.  If
your compiler has a word size of more than 32 bits, try something big
enough to overflow whatever it uses.)
-- 

Frank Adams                           ihnp4!philabs!pwa-b!mmintl!franka
Ashton-Tate          52 Oakland Ave North         E. Hartford, CT 06108



More information about the Comp.lang.c mailing list