[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] gcc warnings
From: |
Thomas Moschny |
Subject: |
Re: [Monotone-devel] gcc warnings |
Date: |
Wed, 04 Mar 2009 19:29:03 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zack Weinberg wrote:
> On Wed, Mar 4, 2009 at 10:17 AM, Zack Weinberg <address@hidden> wrote:
>> I don't have gcc4.4 to hand, but do you get the same diagnostic with
>> this test case?
>
> Slight correction:
>
>> #include <map>
>> typedef std::map<unsigned int, unsigned long> M;
>>
>> bool test(M m, unsigned int k, unsigned long v)
> bool test(M const & m, unsigned int k, unsigned long v)
>> {
>> M::const_iterator i = m.find(k);
>> if (i == m.end()) return false;
>> return (i->second == v);
>> }
No warning with that test case.
- - Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkmuyG8ACgkQm/6MhNYca5ik6gCfS1pq3PEHzLfWMM6MKxY+08Hd
3J8AniRh8aHWz+S/PEYq4W7vl12p59nY
=fWWa
-----END PGP SIGNATURE-----
- [Monotone-devel] gcc warnings, Thomas Keller, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Zack Weinberg, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Thomas Moschny, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Zack Weinberg, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Zack Weinberg, 2009/03/04
- Re: [Monotone-devel] gcc warnings,
Thomas Moschny <=
- Re: [Monotone-devel] gcc warnings, Zack Weinberg, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Thomas Moschny, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Zack Weinberg, 2009/03/04