[Bug c/83324] [feature request] Pragma or special syntax for guaranteed tail calls
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 20 06:34:31 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83324
--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andi Kleen <ak@gcc.gnu.org>:
https://gcc.gnu.org/g:7db47f7b915c5f5d645fa536547e26b92290afe3
commit r15-2170-g7db47f7b915c5f5d645fa536547e26b92290afe3
Author: Andi Kleen <ak@linux.intel.com>
Date: Wed Jan 24 07:44:23 2024 -0800
C: Implement musttail attribute for returns
Implement a C23 clang compatible musttail attribute similar to the earlier
C++ implementation in the C parser.
gcc/c/ChangeLog:
PR c/83324
* c-parser.cc (struct attr_state): Define with musttail_p.
(c_parser_statement_after_labels): Handle [[musttail]].
(c_parser_std_attribute): Dito.
(c_parser_handle_musttail): Dito.
(c_parser_compound_statement_nostart): Dito.
(c_parser_all_labels): Dito.
(c_parser_statement): Dito.
* c-tree.h (c_finish_return): Add musttail_p flag.
* c-typeck.cc (c_finish_return): Handle musttail_p flag.
More information about the Gcc-bugs
mailing list