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]
Other format: [Raw text]

Re: correct way of having a function pointer inside a GTY()-ed struct?


Richard Guenther wrote:
Just do it and fix whatever causes that not to work?!


Apparently, gengtype is behaving better w.r.t. function pointers.

I just wrote

struct basilysroutine_st GTY (()) {
 basilysobject_ptr_t discr;
 char routdescr[BASILYS_ROUTDESCR_LEN];
 basilysroutfun_t* GTY ((skip)) routfunad;
 basilys_ptr_t routdata;
 unsigned nbval;
 basilys_ptr_t GTY ((length ("%h.nbval"))) tabval[FLEXIBLE_DIM];
};

and it works

committed MELT branch rev144987

Apologies for the noise!

Regards.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


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