[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] gcc warnings
From: |
Zack Weinberg |
Subject: |
Re: [Monotone-devel] gcc warnings |
Date: |
Wed, 4 Mar 2009 10:33:52 -0800 |
On Wed, Mar 4, 2009 at 10:29 AM, Thomas Moschny <address@hidden> wrote:
> Zack Weinberg wrote:
>> I don't have gcc4.4 to hand, but do you get the same diagnostic with
>> this test case?
>>
>> #include <map>
>> typedef std::map<unsigned int, unsigned long> M;
>>
>> 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.
What compiler flags did you use? You need at least -O2 -Wall I think...
zw
- [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, 2009/03/04
- Re: [Monotone-devel] gcc warnings,
Zack Weinberg <=
- Re: [Monotone-devel] gcc warnings, Thomas Moschny, 2009/03/04
- Re: [Monotone-devel] gcc warnings, Zack Weinberg, 2009/03/04