[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Tue Oct 1 08:22:21 CEST 2013


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	13/10/01 08:22:21

Modified files:
	cm3/m3-sys/m3back/src/: M3C.m3 

Log message:
	only avoid the gcc type limit warning when using gcc < 4.3
	
	that is, generate operations like ==, <, >, >=, <=, != inline
	instead of via function calls.
	
	The only reason for the function calls is to evade
	gcc looking for a reason to warn, like when saying
	unsigned i < 0 (might be good to optimize
	these away in the frontend, but I'm not holding my breath;
	might also be good for C backend to optimize them away,
	but I'm still not holding my breath -- I did try to
	address this and there are significant remnants in the
	code, but it was proving more difficult than I expected;
	essentially every expression carried whether or not it
	had a min or max and what they were -- though the real
	generality is a set of ranges the expression might fall within;
	and then optimize comparisons that can be proven from those
	constriants...)
	
	I've only actually tested this change with gcc < 4.3.
	I still need to test with gcc >= 4.3 or non-gcc.
	In particular, I was stepping into these functions on AMD64_NT.
	
	When using later versions of gcc, user must pass -Wno-type-limits
	or somesuch, if he passes -Wall -Wextra or somesuch.
	
	Previously the warnings were never generated by any version
	of gcc, but at great inefficiency, and annoyint debugging.




More information about the M3commit mailing list