bug-bison
[Top][All Lists]
Advanced

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

Re: assertion failure / double destruction triggered by parser::symbol_t


From: Wolfgang Thaller
Subject: Re: assertion failure / double destruction triggered by parser::symbol_type's move constructor
Date: Tue, 25 Dec 2018 19:50:19 +0100

Hi Akim,

> On 24.12.2018, at 18:40, Akim Demaille <address@hidden> wrote:

> I just released it.  It includes a copy ctor.

Great! I can confirm that it fixes all my (current) problems :-)

> Well, RVO plays a role here, but I guess the difference is that you had a 
> local variable, whereas I directly return (r)values.  NRVO is harder.

Things were simpler back before C++11 - even if the compiler did RVO, the 
compiler had to flag an error if the copy constructor was declared private.

> Why do you want to avoid including the header?  What could have we done to 
> spare you this effort?

Nothing, really.
The declaration of my lexer is visible from some other modules, and I was 
trying to limit the amount of code I had to recompile when making many small 
grammar changes. In my day job, I have to suffer through 5-minute-recompiles 
for tiny changes, so I guess I just prefer to err on the side of “too much 
decoupling”.

> I have not added the copy-assignment.  I'll address this in Bison 3.3 
> instead, I think it was ok in 3.0 at all.

I agree. Bison 3.0 declared all assignment as private, so allowing assignment 
is just “luxury” for the future.


> Wow, if that was without cheating, congratulations :)  Yet I need Google to 
> answer, although my wife is German...  Shame on me.

J’ai verifié l’orthographie sur Internet… je n’etais plus sur. Est-ce qu’on 
appelle ça «tricher» ?



Cheers,

Wolfgang




reply via email to

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