This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

stale comment in tree.h - on changing layout of tree nodes


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]