[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Sun Jan 17 07:18:29 CET 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/01/17 07:18:29

Modified files:
	cm3/m3-libs/m3core/src/Csupport/Common/: hand.c 

Log message:
	fix bugs, warnings, and crashes (though the crashes are perhaps appropriate)
	unoptimized LONG_MIN divided by negative numbers give negative result but should be positive
	optimized version gives correct result
	gcc 4.2 optimized LONG_MIN divided by -1 raises an exception (possibly ok)
	gcc-4.2 -O2 -Wstrict-overflow=4 gives warnings about signed overlfow; guidance is to use unsigned
	The magnitude of no result should be changed here.
	Test code is included.
	Old versions are retained and exercised by test code, compared to new versions,
	altered only to avoid the exception.
	Passing int64 in K&R style also doesn't work; always use ANSI form;
	I do have HP-UX with K&R only compiler, revisit that later.
	
	All testing done on Darwin/x86 and Darwin/amd64, with gcc 4.2.1.
	Will test others shortly but hard to imagine there is anything wrong here.
	Unsigned operations are much better defined across all platforms
	and Darwin/x86/amd64 merit fixing.




More information about the M3commit mailing list