This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: "long" vs. "long int" (what a mess!)
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: Tom Tromey <tromey at redhat dot com>, archer at sourceware dot org
- Date: Fri, 7 Nov 2008 10:30:30 -0800
- Subject: Re: "long" vs. "long int" (what a mess!)
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1226082634; bh=MqqSIN/oDAptLzJae7aTDXQgsu0=;h=DomainKey-Signature:MIME-Version:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; b=PyFEaG4mo9nCqF2oqvEfdThLUFZpIbsT0KPbyb22FQb/ijTOAIsuyYv7Npnv+URlMZYYaiu2tWkbHk2FIycEfg==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=mime-version:in-reply-to:references:date:message-id:subject:from:to:cc:content-type:content-transfer-encoding;b=pv+1OQbpHBhDezcIUhHDnSD1xJ2Q3lTywtvmARPANQ0vmxHDdNGybWTd8VWpt7LdJJ7n13j1+D3ZiGH3lx6q3Q==
- References: <20081107025507.5BB8E3A6B0D@localhost> <20081107143730.GA9939@caradoc.them.org> <m3r65na1u2.fsf@fleche.redhat.com> <20081107173439.GA20910@caradoc.them.org>
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