This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpp issues
- To: zack at rabi dot columbia dot edu
- Subject: Re: cpp issues
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 25 Feb 1999 10:16:32 -0500 (EST)
- Cc: brolley at cygnus dot com, egcs-patches at egcs dot cygnus dot com
> 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