> > > > +  set_musttail_on_return (retval, xloc, musttail_p);
> > > > +
> > > >    if (retval)
> > > >      {
> > > >        tree semantic_type = NULL_TREE;
> > > 
> > > Is it deliberate that set_musttail_on_return is called outside the
> > > if (retval) block?  If it can be moved into it, set_musttail_on_return
> > > can be simplified to assume that retval is always non-null.
> > 
> > Yes it can be removed.

Actually I was wrong here, after double checking. The !retval case is
needed to diagnose a [[musttail]] set on a plain return (which is not
allowed following the clang spec)

So the call has to be outside the check.

The C frontend did it correctly, but the C++ part did not (fixed now)

-Andi

Reply via email to