]> git.ipfire.org Git - thirdparty/gcc.git/commit
C: Implement musttail attribute for returns
authorAndi Kleen <ak@linux.intel.com>
Wed, 24 Jan 2024 15:44:23 +0000 (07:44 -0800)
committerAndi Kleen <ak@gcc.gnu.org>
Sat, 20 Jul 2024 06:28:58 +0000 (23:28 -0700)
commit7db47f7b915c5f5d645fa536547e26b92290afe3
treeec93fee82d935cdedc107b9fad9792a9d28a0cf6
parent59dd1d7ab21ad9a7ebf641ec9aeea609c003ad2f
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.
gcc/c/c-parser.cc
gcc/c/c-tree.h
gcc/c/c-typeck.cc