http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46076

--- Comment #14 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-18 
12:11:42 UTC ---
(In reply to comment #13)
> > That said - the middle-end doesn't really have a notion of "unprototyped".
> > That's a concept the frontend should lower (at call-sites, but that
> > requires some middle-end infrastructure change).
> What I was thinking of here is some gimple optimization working out that we 
> can
> update type of the originally indirect call...  That way the types don't need
> to
> be neccesarily compatible.
> Obviously K&R C will also do variadic functions without prototypes...

What we need (and what I unfortunately have postponed to next stage1) is
a way to keep the (indirect call) function type.  For which I will simply
add a fn_type member to gimple_call which is controlled by the frontend.
We then can treat function pointer conversions as useless (and then
the inliner has to decide if the call is suitable for the fndecl).

Reply via email to