aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-03-28 08:57:11 -0400
committerPatrick Palka <ppalka@redhat.com>2020-03-28 08:57:11 -0400
commit7981c06ae92548bd66f07121db1802eb6aec73ed (patch)
treec5c9ddcf1dd284be44597236b30a683b91ba4ddd /gcc/fortran/decl.c
parenta7ea3d2ced786c4544fa625f34f515d89ed074fe (diff)
downloadgcc-7981c06ae92548bd66f07121db1802eb6aec73ed.zip
gcc-7981c06ae92548bd66f07121db1802eb6aec73ed.tar.gz
gcc-7981c06ae92548bd66f07121db1802eb6aec73ed.tar.bz2
c++: Diagnose when "requires" is used instead of "requires requires" [PR94306]
This adds support to detect and recover from the case where an opening brace immediately follows the start of a requires-clause. So rather than emitting the error error: expected primary-expression before '{' token followed by a slew of irrevelant errors, we now assume the user had intended to write "requires requires {" and diagnose and recover accordingly. gcc/cp/ChangeLog: PR c++/94306 * parser.c (cp_parser_requires_clause_opt): Diagnose and recover from "requires {" when "requires requires {" was probably intended. gcc/testsuite/ChangeLog: PR c++/94306 * g++.dg/concepts/diagnostic8.C: New test.
Diffstat (limited to 'gcc/fortran/decl.c')
0 files changed, 0 insertions, 0 deletions