cpplib: Charconsts and escape sequences

Neil Booth neil@daikokuya.demon.co.uk
Sat May 4 00:01:00 GMT 2002


Zack Weinberg wrote:-

> I like this.  You should test it with a sparc-sun-solaris2.8 target;
> that's the situation where the lex_charconst issue shows up.  (It has
> a combination of 64-bit HOST_WIDE_INT and a bizarre definition of
> WCHAR_TYPE.)  A cross-compiler will work fine.

OK, I'll do that.
 
> I'm not sure if two-integer arithmetic is really what we want.  There
> are known situations where a 32-bit host needs to do 128-bit
> arithmetic; I think we currently deal with that by forcing
> HOST_WIDE_INT to be "long long" when it comes up.  A real
> multiple-precision library would be better.  (I don't think any of
> these situations affect cpplib, but if we're going to do this we might
> as well do it right.)

2-integer arithmetic would still manage this cross, provided that cpplib
can rely on the presence of "unsigned long long" and make that type
one of its half-integers.  This would presumably be done as configure
time if it were discovered that the default of "unsigned long" were
not enough.  In particular, if GCC itself were the build compiler, which
we can reasonably assume what with GCC running native on most hosts,
then there is no issue.

I've had a look at e.g. GNU MP and it's huge.  It would be a shame to
bloat cpplib to that extent IMO, to cover a truly small proportion of
host / target combinations.  Why not go with 2-integers, and worry
about it if it turns out to be insufficient?

Neil.



More information about the Gcc-patches mailing list