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

Jim Idle jimi at temporal-wave.com
Tue Feb 3 10:46:13 PST 2009


Andy Grove wrote:
> Jim,
>
> Thanks. I'll modify the grammar and that will work fine with Java or 
> C. It would be nice if the C generator could init the member variables 
> of the struct so that the generated NULL check doesn't cause a seg 
> fault. Just a nice to have though.
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.

Jim



More information about the antlr-interest mailing list