]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Reject gimple and rtl functions as needed functions [PR121421]
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 16 Sep 2025 05:37:44 +0000 (22:37 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Tue, 16 Sep 2025 22:28:48 +0000 (15:28 -0700)
commitdf5088e9a231159c8035debda18b997bc0eeeefb
tree06344d552bfd2efa7b48de792cbb7b10da481f92
parent5eb86c29d29fa25f8ad81d75730a993bb03fb558
c: Reject gimple and rtl functions as needed functions [PR121421]

These two don't make sense as nested functions as they both don't handle
the unnesting and/or have support for the static chain.

So let's reject them.

Bootstrapped and tested on x86_64-linux-gnu.

PR c/121421

gcc/c/ChangeLog:

* c-parser.cc (c_parser_declaration_or_fndef): Error out for gimple
and rtl functions as nested functions.

gcc/testsuite/ChangeLog:

* gcc.dg/gimplefe-error-16.c: New test.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/c/c-parser.cc
gcc/testsuite/gcc.dg/gimplefe-error-16.c [new file with mode: 0644]