C++: Fix three mangling bugs

Mark Mitchell mark@codesourcery.com
Fri Jun 9 20:01:00 GMT 2000


>>>>> "Chip" == Chip Salzenberg <chip@valinux.com> writes:

    Chip>   1. Constant values throughout the range of both
    Chip> HOST_WIDE_INT and 'unsigned HOST_WIDE_INT' may be used as
    Chip> template parameters. [*] So it's vital that the numeric
    Chip> mangling handle them.

I agree 100%.  As for your asterisk, it's true that that's an issue --
and one that has never been solved in any version of G++, I don't
think.  What's really needed is a language-independent INTEGER_CST
printing routine that deals with constants that have values too big to
represent in a HOST_WIDE_INT.  Such a thing is actually harder to
write than it seems at first -- but certainly doable.

    Chip>   2. HOST_WIDE_INT may be larger than int.

    Chip>   3. This code may be compiled by a K&R compiler, so we
    Chip> can't count on prototypes to do the conversions.  Or, am I
    Chip> wrong about that?  Is the C++ front end only compiled with
    Chip> gcc?

Yes, but still an interesting point.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list