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

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #6 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to ak from comment #5)
> An option would be to make __has_attribute musttail return 0 on those
> targets.

But the attribute does exist, and work, on those targets: where the compiler is
able to emit a tail call, it will emit a tail call. Where the compiler is not
able to emit a tail call, it will issue an error. That is exactly what the
attribute is meant to do. If someone is writing code that uses musttail
unconditionally, they are informing the compiler that they want to get an error
message on those platforms where it will not work for that specific function,
and the compiler is doing exactly what they asked.

(In reply to Richard Biener from comment #4)
> Guess we want a [[shouldtail]] where not tail-calling is OK semantically but
> highly desireable for performance.

Would __attribute__((optimize("-foptimize-sibling-calls"))) already work for
that?

Reply via email to