[PATCH 1/3] vec: add exact argument for various grow functions.

Martin Liška mliska@suse.cz
Wed Aug 12 12:28:09 GMT 2020

On 8/11/20 4:58 PM, Martin Sebor wrote:
> On 8/11/20 5:36 AM, Martin Liška wrote:
>> Hello.
>> All right, I did it in 3 steps:
>> 1) - new exact argument is added (no default value) - I tested the on x86_64-linux-gnu
>> and I build all cross targets.
>> 2) set default value of exact = false
>> 3) change places which calculate its own growth to use the default argument
> The usual intent of a default argument is to supply a value the function
> is the most commonly invoked with.   But in this case it looks like it's
> the opposite: most of the callers (hundreds) provide the non-default
> value (true) and only a handful make use of the default.  I feel I must
> be  missing something.  What is it?

You are right, but Richi wanted to make this transformation in more defensive way.
I'm eventually planning to drop the explicit 'true' argument for most of the places
except selective scheduling and LTO streaming.

I guess Richi can defend his strategy for this ;) ?


> Martin
>> I would like to install first 1) and then wait some time before the rest is installed.
>> Thoughts?
>> Martin

More information about the Gcc-patches mailing list