This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: "long" vs. "long int" (what a mess!)


On Fri, Nov 7, 2008 at 9:34 AM, Daniel Jacobowitz <drow@false.org> wrote:

> On Fri, Nov 07, 2008 at 10:21:57AM -0700, Tom Tromey wrote:

>> How does keytype end up as 'long' and not 'const long int'?  Is it
>> because cp_comp_to_string returns the type in a different form than
>> what is stored internally?
>
> This I have no idea.  The missing const is not a canonicalization
> issue; it will not add or drop consts, naturally.

Oh, I misunderstood the question ...

The type of "problem" map is:

(gdb) ptype map_long_int
type = class std::map<long, int, std::less<long>,
                      std::allocator<std::pair<long const, int> > > {
  private:
...

So there is no 'const' issue (pretty-printer adds one in [1]),
only the 'long' vs. 'long int' issue.

[1] There is a separate problem with e.g. 'map<const char *, ...>',
but I'll start a separate thread on that shortly.

-- 
Paul Pluzhnikov


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