[antlr-interest] Error in generated C code (struct referenced without being initialized)

Gavin Lambert antlr at mirality.co.nz
Tue Feb 3 11:52:05 PST 2009


At 07:46 4/02/2009, Jim Idle wrote:
 >I can no longer remember why it does not do this. I will look
 >in to it, but I think that the issue is you can return anything
 >you like in the structure and so if it is not something that
 >can be initialized to NULL, it breaks the code generation.

You could memset(foo, 0, sizeof(*foo)) it... :)  (Arguably this 
should be done for scopes as well, especially if you're reusing 
previously populated structures.)



More information about the antlr-interest mailing list