Errors when adding new member vars in 'struct function' ?
Ian Lance Taylor
iant@google.com
Thu Apr 2 21:36:00 GMT 2009
QiangHuang <qianghuang87@gmail.com> writes:
> I intend to add a new member var in the structure of 'struct
> function'.Take var 'struct if_fact' as an example.
>
> struct function
> {
> ...
> ...
> struct if_fact; /* new member var here. */
> }
>
> When compiled, an error occured, saying that "undefined reference
> to 'gt_pch_nx_if_fact' and 'gt_ggc_mx_if_fact' ".
> These two missing functions seemed to be automatically generated
> by gengtype in the file of 'gtype-desc.c'.
> Thus I don't exactly know how to solve this problem.
You need to define struct if_fact somewhere with a GTY annotation
somewhere that gengtype will see it.
http://gcc.gnu.org/onlinedocs/gccint/Type-Information.html
Ian
More information about the Gcc-help
mailing list