stale comment in tree.h - on changing layout of tree nodes
Gary Funck
gary@Intrepid.Com
Mon Feb 26 14:42:00 GMT 2001
Hello, while in the process of implementing some language
extensions in gcc, I found this comment in tree.h (gcc 2.95.2):
/* Every kind of tree node starts with this structure,
so all nodes have these fields.
See the accessor macros, defined below, for documentation of the fields.
DO NOT change the layout of tree_common unless absolutely necessary. Some
front-ends (namely g++) depend on the internal layout of this tructure.
See my_tree_cons in the cp subdir for such uglyness. Ugh. */
struct tree_common
{
[....]
First a question: is there any technical risk to adding bit fields into
the common part of the tree node (yes, I'm aware of the LANG flags)?
And an observation: I don't think my_tree_cons exists any more.
Therefore, wouldn't it be safe (and desirable) to remove the
"DO NOT change" warning above? Or is there some other g++
function that still relies on field ordering?
More information about the Gcc
mailing list