This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Charconsts and escape sequences
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 3 May 2002 20:07:53 -0700
- Subject: Re: cpplib: Charconsts and escape sequences
- References: <20020503205035.GA3829@daikokuya.demon.co.uk>
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