This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: rfc: multiple decls for functions
On Tuesday 23 December 2008 01:44:33 Mikael Morin wrote:
> Daniel Franke wrote:
> > Maybe I'm thick, but there's one point that still doesn't make any sense
> > to me: why are there any regressions like these at all? Why is it
> > suddenly necessary to fiddle and twiddle at so many places because of
> > special cases? Although we currently have two or more backend_decls for
> > the same function, each of them seems to work individually. When merging
> > the available information into one backend_decl, why is it suddenly
> > necessary to change things that don't need to be changed in the current
> > implementation? Or do they need changing but it doesn't show?
>
> I'm not sure.
> Without the patch, we create a function declaration for a function call
> and another one for the function definition.
> With the patch, we try to guess the function interface matching the
> function call. But it can be wrong.
That's the second point I wondered about but I assumed others knew: why do we
start guessing the expected type of the dummy arguments? Currently, if there
is an external function, we can call it fine even if no explicit interface
exists. Why not create the initial decl without arguments and add them later
on if an explicit interface is found? Or omit them completely if not, like I
think it is done currently? I assume that the processing of the backend_decls
only starts after all of them are available, so deferred adding of arguments
types shouldn't pose any problems?!
Currently applying the patch and dabbling with it myself ...