This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: need function decl/type in get_parm_info
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 01 Aug 2003 18:37:05 -0700
- Subject: Re: need function decl/type in get_parm_info
- References: <200308020030.h720UDQ17207@greed.delorie.com>
DJ Delorie <dj@redhat.com> writes:
> I'm working on converting PROMOTE_PROTOTYPES to be a target hook,
> sensitive to any attributes that might have been added to the function
> decl. Unfortunately, one of the places it's used - get_parm_info() in
> c-decl.c - happens before current_function_decl is defined, and there
> doesn't appear to be an obvious way to get the function type or decl.
>
> Alternately, can the promotions be deferred until later, when the decl
> is available? If so, where's the best place to move it to?
I don't have a good answer, but I think c-decl.c shouldn't have to
know about this particular target hook. Adjusting as-passed argument
types should happen only when converting to RTL.
zw