bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for Bison 3.1 and VC2015


From: Paul Eggert
Subject: Re: Patch for Bison 3.1 and VC2015
Date: Fri, 28 Sep 2018 23:23:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Akim Demaille wrote:
why didn’t you use alloca?

It's common that alloca does not check for stack overflow, so alloca (N) is unwise if N is unbounded. I did consider using alloca if N is small, but even then it's a win to use malloc in the typical case where uniqstr_concat generates a new string, because in that case malloc needs to be called anyway and using alloca would mean an unnecessary copy.

Joel’s trick for UNIQSTR_CONCAT was amazing :)

I was hoping you'd say that about *my* trick for UNIQSTR_CONCAT. Oh well :-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]