https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121971
Bug ID: 121971 Summary: [15/16 Regression] Only warn about musttail on exotic targets? Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bunk at stusta dot de Target Milestone: --- https://gcc.gnu.org/onlinedocs/gcc-15.1.0/gcc/Statement-Attributes.html#index-musttail-statement-attribute ... If the compiler cannot generate a musttail tail call it reports an error. On some targets, tail calls may not be supported at all. ... In practice this looks like https://buildd.debian.org/status/logs.php?pkg=protobuf&ver=3.21.12-12 (click on Maybe-Failed for the complete logs), and this is even an understatement since ppc and 32-bit arm were already blacklisted: https://sources.debian.org/src/protobuf/3.21.12-11/src/google/protobuf/port_def.inc#L257-L260 The 64-bit variants of x86 and arm seem to be properly working (and tend to have the most relevant user bases), the current situation on more exotic targets looks rather bleak. The upstream fix is to use a whitelist instead: https://github.com/protocolbuffers/protobuf/commit/719f3037032b2e952afe7fc49152cc4be38fa7a3 This bug is about the problem that not target-dependent code that wants to use musttail currently needs such #ifdef's, which means in practice that there will be some boilerplate #ifdef's pasted around widely. It would be preferable if the compiler would only warn about musttail on more exotic targets.