[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: member with constructor not allowed in union
From: |
Hans Aberg |
Subject: |
Re: member with constructor not allowed in union |
Date: |
Tue, 19 Mar 2002 19:21:02 +0100 |
At 11:28 -0500 2002/03/19, Anthony DeRobertis wrote:
>On Monday, March 18, 2002, at 06:28 AM, Hans Aberg wrote:
>
>> ... not compile the C output as C++.
>
>This used to work, in the same stable series of bison. It was
>never documented not to work, and perhaps is even documented to
>work.
>
>Changing that is fine and --- in view of the other C++ problems
>using the C skeleton --- a good idea, but not in a stable point
>release.
>
>It breaks a fair amount of software. It breaks stuff that, when
>reading the documentation, should work. Don't do that in a
>stable point release.
Changing bison.simple with respect to "compile C as C++" does not
officially break any code at all, as it never was a documented feature.
The undocumented "compile C as C++" feature broke for two reasons: First,
somebody implemented a dynamic C stack, which was probably OK on early C++
compilers that did not detect the C++ union-non-trivial constructor
prohibition. And then when people upgrade their C++ compilers, this is
suddenly detected and bang, the code does not compile anymore.
There are now two facts: The dynamic C stack is probably great for those
that use C, and this stack is a semantic error under C++ even if it would
compile, as it does not invoke C++ copy constructors when re-allocating
stack memory.
So therefore, it seems me best to keep bison.simple as it is with its
static-dynamic hybrid stack, and introduce as soon as possible a proper C++
skeleton file that does not contain any C++ semantic errors.
Hans Aberg
- Re: member with constructor not allowed in union, (continued)
- Re: member with constructor not allowed in union, Hans Aberg, 2002/03/18
- Re: member with constructor not allowed in union, Akim Demaille, 2002/03/18
- Re: member with constructor not allowed in union, Hans Aberg, 2002/03/18
- Re: member with constructor not allowed in union, Richard B. Kreckel, 2002/03/18
- Re: member with constructor not allowed in union, Akim Demaille, 2002/03/18
- Re: member with constructor not allowed in union, Hans Aberg, 2002/03/18
- Re: member with constructor not allowed in union, Anthony DeRobertis, 2002/03/19
- Re: member with constructor not allowed in union, Akim Demaille, 2002/03/19
- Re: member with constructor not allowed in union, Hans Aberg, 2002/03/19
- Re: member with constructor not allowed in union, Akim Demaille, 2002/03/20
- Re: member with constructor not allowed in union,
Hans Aberg <=
- Re: member with constructor not allowed in union, Anthony DeRobertis, 2002/03/20
- Re: member with constructor not allowed in union, Akim Demaille, 2002/03/20
- Re: member with constructor not allowed in union, Akim Demaille, 2002/03/20
- Re: member with constructor not allowed in union, Hans Aberg, 2002/03/20
- Re: member with constructor not allowed in union, Paul Eggert, 2002/03/18
- Re: member with constructor not allowed in union, Richard B. Kreckel, 2002/03/19
- Bison 1.34a is released (Was: member with constructor not allowed in union), Akim Demaille, 2002/03/20
- Re: Bison 1.34a is released (Was: member with constructor not allowed in union), Richard B. Kreckel, 2002/03/20
- Re: Bison 1.34a is released (Was: member with constructor not allowed in union), Akim Demaille, 2002/03/20
- Debian changes for Bison, Paul Eggert, 2002/03/20