Index: gcc-trunk-bstarynk/gcc/gengtype.c
===================================================================
--- gcc-trunk-bstarynk/gcc/gengtype.c	(revision 191972)
+++ gcc-trunk-bstarynk/gcc/gengtype.c	(working copy)
@@ -2810,6 +2810,7 @@ walk_type (type_p t, struct walk_type_data *d)
 	const char *oldval = d->val;
 	const char *oldprevval1 = d->prev_val[1];
 	const char *oldprevval2 = d->prev_val[2];
+	const char *structmarkhook = NULL;
 	const int union_p = t->kind == TYPE_UNION;
 	int seen_default_p = 0;
 	options_p o;
@@ -2833,7 +2834,14 @@ walk_type (type_p t, struct walk_type_data *d)
 	  if (!desc && strcmp (o->name, "desc") == 0
 	      && o->kind == OPTION_STRING)
 	    desc = o->info.string;
+	  else if (!structmarkhook && strcmp(o->name, "mark_hook") == 0
+		   && o->kind == OPTION_STRING)
+	    structmarkhook = o->info.string;
 
+	if (structmarkhook) 
+	    oprintf (d->of, "%*s/*structmarkhook %s */ %s (&%s));\n",
+		     d->indent, "", t->u.s.tag,  structmarkhook, oldval);
+	  
 	d->prev_val[2] = oldval;
 	d->prev_val[1] = oldprevval2;
 	if (union_p)
