Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think it will be a new syntax, just an attribute on existing syntax, eg.

    [[clang:musttail]] f(a, b);
or:

    [[clang:musttail]] return f(a, b);
> Also, may I suggest that it runs destructors prior to the jump rather than throwing up it's hands and saying you can't TCO because you have destructors?

I don't think that is feasible, it would change the semantics of the language. You can always put your destructors in an inner scope if you want them to run first:

int Func() { { TypeWithDestructor a; int ret = a.get(); } [[clang:musttail]] return ret; }



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: