Jason Merrill <ja...@redhat.com> writes:

> On 07/27/2011 01:54 PM, Dodji Seketeli wrote:
>> +  /*  Set of typedefs that are used in this function.  */
>> +  struct pointer_set_t * GTY((skip)) used_local_typedefs;
>
> Is there a reason not to just use TREE_USED for this?
>
>> +  /* Vector of locally defined typedefs, for
>> +     -Wunused-local-typedefs.  */
>> +  VEC(tree,gc) *local_typedefs;
>
> If the accessors are in c-common, this field should be in
> c_language_function.

Looking into this a bit, it seems to me that I can access
cfun->language->base (of type c_language_function) from inside either
the C or C++ FE only, as the type of cfun->language -- which is of type
struct language_function -- is only defined either in c-lang.h or
cp-tree.h.  I cannot access it from c-common.c.

This is consistent with the comment of the language field of the
function struct:

  /* Language-specific code can use this to store whatever it likes.  */
  struct language_function * language;

What am I missing?

-- 
                Dodji

Reply via email to