Coverity complains "Big parameter passed by value" in /usr/include/c++/4.6/bits/stl_heap.h
Marc Glisse
marc.glisse@inria.fr
Thu Jul 25 08:32:00 GMT 2013
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.
--
Marc Glisse
More information about the Libstdc++
mailing list