[antlr-interest] Bug report; generated C(++) code inappropriately initialises non-primitive return values
Gavin Lambert
antlr at mirality.co.nz
Tue Mar 31 01:19:06 PDT 2009
At 04:29 31/03/2009, Johannes Luber wrote:
>C# has solved the problem with using the default keyword
>(which initializes structs with the default constructor,
>which is the 0-bit pattern, and for references simply null)
>but I don't think that C(++) has an equivalent.
IIRC there's something in Boost that's the equivalent of the C#
construct. But of course that's C++ only.
In C you can initialise any basic variable with 0, though (the
only exceptions being bare structures and arrays).
More information about the antlr-interest
mailing list