cpplib: Charconsts and escape sequences
Zack Weinberg
zack@codesourcery.com
Fri May 3 20:07:00 GMT 2002
On Fri, May 03, 2002 at 09:50:36PM +0100, Neil Booth wrote:
> This patch is further preparation for cpplib having a correct
> implementation of arithmetic to the correct target-precision,
> so that, in particular, it has no dependence on HOST_*_INT
> macros.
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.
Cleaning up the interface to cpp_parse_escape/cpp_interpret_charconst
is a Good Thing. The bitmask mess was asking for trouble.
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.)
zw
More information about the Gcc-patches
mailing list