https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111643
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #10 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(In reply to Lukas Grätz from comment #9)
> I also wondered whether
>
> int bar_alias (void) { return bar_original(); }
>
> could be a portable alternative to attribute alias. Except that current GCC
> does not translate it that way.
That's because function addresses are significant and so
&bar_alias == &bar_original
must evaluate to false, but would be true for aliases.
In theory compilers could do better by introducing fall-through aliases:
https://gcc.gnu.org/wiki/cauldron2019talks?action=AttachFile&do=view&target=fallthrough-aliases.pdf