This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++: Fix three mangling bugs


According to Mark Mitchell:
> 	Correctly mangle numbers up to max of unsigned HOST_WIDE_INT.
> 
>   I'm not keen on your approach here. :-) I don't think `int' needs to
> be cast to `HOST_WIDE_INT' everywhere.  Am I missing something?

Well, here's my reasoning:

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

  2. HOST_WIDE_INT may be larger than int.

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

[*] Actually, 'long long' constant values may also be used as template
    parameters.  So you have to deal with even bigger things.  But that
    is something I didn't think of until now.
-- 
Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]