This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cpp issues


 > From: Zack Weinberg <zack@rabi.columbia.edu>
 >  
 > Is the truncation problem now specific to irix6 or does it happen on
 > other platforms too?
 > zw

	Here are the results when configuring with --enable-c-cpplib
and using my patch.

NOTE: the truncation problem does not occur with cccp.c, only with cpplib.

powerpc-ibm-aix4.1.4.0
cpp-if3.c:11:75: #error "simple truncation"   
cpp-if3.c:17:80: #error "bit shift truncation"  
cpp-if3.c:22:71: #error "math truncation"   

sparc-sun-solaris2.5
cpp-if3.c:11:75: #error "simple truncation"   
cpp-if3.c:17:80: #error "bit shift truncation"  
cpp-if3.c:22:71: #error "math truncation"   

alphaev5-dec-osf4.0b
PASS

mips-sgi-irix6.2
cpp-if3.c:11:75: #error "simple truncation"   
cpp-if3.c:17:80: #error "bit shift truncation"  
cpp-if3.c:22:71: #error "math truncation"   

	I think on irix6, sizeof(long) is 4 bytes by default unless
you use -mabi=64.

	So based on the above results, my guess is that somewhere gcc is
still using HOST_WIDE_INT/long where it should be using HOST_WIDEST_INT. 
That would explain the PASS for the alpha, because it alone has a 64 bit
long by default. 

	I'm still looking at this, mainly by comparing cexp.y with
cppexp.c, but if you cpplib experts can provide insights into where to
look first, it would help speed this up. 

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]