[antlr-interest] Reporting a bug in C Target

Gokulakannan Somasundaram gokul007 at gmail.com
Wed Dec 9 03:05:26 PST 2009


>
> Another possibility, if you want to keep the per-member initialisation:
> what about using 0 as an initialiser rather than NULL?  If I'm remembering
> the C rules properly (though things are slightly different in C++), 0 is a
> valid initialiser for every scalar type (integer, floating-point, pointer,
> enum) -- unlike NULL, which is specifically typed to be a pointer.
>
> Assigning it to 0, will again cause trouble for C++ folks. But definitely
leaving it uninitialized will provide a lot of flexibility and any C/C++
programmer will obviously find out and fix bugs arising out of it. For
example, we can ask users to initialize in the init section.

Thanks,
Gokul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091209/ae004fcd/attachment.html 


More information about the antlr-interest mailing list