[M3devel] DECL_LANG_SPECIFIC and casts?

Jay K jay.krell at cornell.edu
Wed May 26 16:20:04 CEST 2010


Tony, this thing where we do:

  DECL_LANG_SPECIFIC(f) = (lang_decl_t*)var; /* we will fix the offset later once we have rtl */
...

      tree var = (tree)DECL_LANG_SPECIFIC(index);


Is this running afoul of the gcc garbage collector?
  Seems likely.

And does it matter?
  Seems very uncertain. I know almost nothing here, but it looks like we do hold on to the thing until the end anyway,
 assuming m3_write_globals is called near the end.


Thing is:
struct lang_identifier GTY(()) ...
union lang_tree_node GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"))) ...
struct lang_type GTY(()) ...
typedef struct lang_decl GTY(()) ...
struct language_function GTY(()) ...


Which are nearly unused, cause me grief.
They have to be different for 4.5 vs. 4.2/4.3.
  Just the GTY needs to be moved to before the union/struct tag.


I'd like to keep the code compatible with 4.2 at least until a separate upgrade of the iPhone backend.
  I haven't checked what Apple is up to there though. Could also make sense to merge their changes..but there's generally
   aren't so small like ours so I'd rather not.


 - Jay
 		 	   		  


More information about the M3devel mailing list