This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] PR C++/12574
> On Tue, 2003-10-14 at 09:20, Jan Hubicka wrote:
> > > On Tue, 2003-10-14 at 01:46, Jan Hubicka wrote:
> > > > Hi,
> > > > the testcase shows that there is yet another way to reffer to functiona
> > > > ddress using baselink expression. I am not quite sure I deal with all
> > > > cases correctly as perhaps I should do something about TEMPLATE_DECL and
> > > > OVERLOAD too. Mark?
> > >
> > > I think that if this patch is necessary something else is wrong.
> > >
> > > First, the language-specific tree code is BASELINK, not ADDR_EXPR. So,
> >
> > OK, can BASELINK appear in other context than ADDR_EXPR too, for
> > instance to represent direct call?
>
> Don't know -- but cxx_callgraph_expr should be parallel to
> cxx_expand_expr. That's the canonical source of front-end specific tree
> nodes that can be seen by the middle end.
The problem is that dealing with FUNCTION_DECL inside ADDR_EXPR differ
from dealing with FUNCTION_DECL inside CALL_EXPR, but the callback for
architecture dependent nodes does not tell me the context.
In case all BASELINKs appear inside FUNCTION_DECL it is quite easy but
in the other case I would need to add some code to pass around the
context in case you don't like the current way of dealing with ADDR_EXPR
as with target specific node in the case it contains unknown code
inside.
Why do we have BASELINK at all when it expands into NOP?
Honza
>
> --
> Mark Mitchell <mitchell@doubledemon.codesourcery.com>
> CodeSourcery, LLC