https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98896

--- Comment #8 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Jakub Jelinek from comment #7)
> It doesn't mean you can't use "r" (&&lab),

Well, if not for Andrew telling exactly that
you can't, both here and in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29305
then indeed, it doesn't.
Because this seems to work:
---
int main(void)
{
    __label__ cont;
    asm volatile goto (
        "push %0\n"
        "ret\n"
    ::"r"(&&cont):"memory":cont);
cont:
    return 0;
}
---

So... is this a correct, documented, supported etc
way of doing things, and it won't disappear in the
next gcc version?
Then perfectly fine.

Thanks for your help!

Reply via email to