diff options
author | Marek Polacek <polacek@redhat.com> | 2023-10-17 16:11:11 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2023-10-17 17:44:59 -0400 |
commit | 1fbb7d75abbb050f790d8b43422602ee4b152608 (patch) | |
tree | b3745431a0e2b6322e7722fed316325e0b474349 /gcc/testsuite/gm2/isolib | |
parent | 765c3b8f82d50961008c214ac2113f35e7532aa9 (diff) | |
download | gcc-1fbb7d75abbb050f790d8b43422602ee4b152608.zip gcc-1fbb7d75abbb050f790d8b43422602ee4b152608.tar.gz gcc-1fbb7d75abbb050f790d8b43422602ee4b152608.tar.bz2 |
c++: accepts-invalid with =delete("") [PR111840]
r6-2367 added a DECL_INITIAL check to cp_parser_simple_declaration
so that we don't emit multiple errors in g++.dg/parse/error57.C.
But that means we don't diagnose
int f1() = delete("george_crumb");
anymore, because fn decls often have error_mark_node in their
DECL_INITIAL. (The code may be allowed one day via https://wg21.link/P2573R0.)
I was hoping I could use cp_parser_error_occurred but that would
regress error57.C.
PR c++/111840
gcc/cp/ChangeLog:
* parser.cc (cp_parser_simple_declaration): Do cp_parser_error
for FUNCTION_DECLs.
gcc/testsuite/ChangeLog:
* g++.dg/parse/error65.C: New test.
Diffstat (limited to 'gcc/testsuite/gm2/isolib')
0 files changed, 0 insertions, 0 deletions