On 07/29/2011 10:27 AM, Dodji Seketeli wrote:
Jason Merrill<ja...@redhat.com> writes:
On 07/29/2011 08:36 AM, Dodji Seketeli wrote:
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.
I think you can use (struct c_language_function *)cfun->language.
I see.
Looking a bit further, it looks like the C FE uses cfun->language only
to store the context of the outer function when faced with a nested
function. This is done by c_push_function_context, called by
c_parser_declaration_or_fndef. Otherwise, cfun->language is not
allocated. Is it appropriate that -Wunused-local-typedefs allocates it
as well?
I think so. Joseph?
Jason