[EMAIL PROTECTED] writes:

> I guess that if there is, as Akim says, a dedicated effort for the C- 
> parser to compile under C++ in current and upcoming Bison versions,  

That's not clear to me.  yacc.c happens to work, but I'd be surprised
if the yacc.c code actually conforms to the current C++ standard, and
thus there are no guarantees.  I don't recommend this usage, and I'd
rather not document it.  People who misuse C++ compilers as if they
were C compilers tend to know about the issues involved; but it's on
them to get this to work, and it's their responsibility if it doesn't.

>> Not if the compiler #defines __cplusplus.  So it's not a problem for
>> C++ compilers.
>
> I do not see what you have in your mind here.

If a compiler defines __cplusplus, then yacc.c by default never calls
memcpy, so there should never be a correctness issue about bypassing
user-defined C++ assignment operators.  There is a way to override
this, but it's not documented and nobody should use it unless they
really know what they're doing, and (again) it's on them to get it to
work.  For details, please see data/yacc.c; for an example, see
src/parse-gram.c.


Reply via email to