On Sat, Jul 30, 2011 at 07:08:39PM +0200, Jakub Jelinek wrote: > So, if you really want a target hook to return or fill up a HARD_REG_SET, > I think it is best to pass void * around if we don't to include tm.h back in > target hook headers.
An alternative would be to put HARD_REG_SET into a struct just for those APIs that can't have tm.h included and leave HARD_REG_SET as a type as is. There would be struct hard_reg_set_wrapped; the target hooks would take struct hard_reg_set_wrapped * arguments and struct hard_reg_set_wrapped would be then defined somewhere to struct hard_reg_set_wrapped { HARD_REG_SET set; }; But I really think it is a mistake to change HARD_REG_SET itself, at least before we are actually there to be able to have a full multi-target cc1 (if that is a goal). Jakub