Coverity complains "Big parameter passed by value" in /usr/include/c++/4.6/bits/stl_heap.h

Paolo Carlini paolo.carlini@oracle.com
Thu Jul 25 09:04:00 GMT 2013


On 07/25/2013 10:32 AM, Marc Glisse wrote:
> On Thu, 25 Jul 2013, Jonathan Wakely wrote:
>
>> On 25 July 2013 07:16, Marc Glisse wrote:
>>>
>>> Isn't it this PR?
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51965
>>
>> Yes, I suppose it is, although your suggestion in comment 5 (which I
>> prefer to the pass-by-reference change) would still trigger the same
>> check in Coverity, wouldn't it?
>
> Possibly, yes. I don't know if it has any heuristic to inhibit the 
> warning depending on what the caller looks like.
>
> Note that IIRC the pass by reference version is much easier for the 
> second occurence (pop_heap) and feels quite natural.
Completely forgot this PR. Marc, it would be great if you could review 
the proposed patch...

Paolo.



More information about the Libstdc++ mailing list