diff options
author | Richard Biener <rguenther@suse.de> | 2022-10-13 12:59:09 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-10-13 13:48:54 +0200 |
commit | 786e4c024f941671a233f5779d73a5d22f4e9588 (patch) | |
tree | 53acf5ed89d025c51d9961c64f2451a4d9071af4 /libcpp/include/cpplib.h | |
parent | 9f0d4adabe2035886a1aa8d2ca990a90de000613 (diff) | |
download | gcc-786e4c024f941671a233f5779d73a5d22f4e9588.zip gcc-786e4c024f941671a233f5779d73a5d22f4e9588.tar.gz gcc-786e4c024f941671a233f5779d73a5d22f4e9588.tar.bz2 |
diagnose return statement in match.pd (with { ... } expressions
The expression in (with { ... } is used like a statement expression
which means control flow that leaves it is not allowed. The following
explicitely diagnoses 'return' and fixes up the few cases that crept
into match.pd (oops). Any such return will prematurely end matching
the current expression.
* genmatch.cc (parser::parse_c_expr): Diagnose 'return'.
* match.pd: Replace 'return' statements in with expressions
with appropriate variants.
Diffstat (limited to 'libcpp/include/cpplib.h')
0 files changed, 0 insertions, 0 deletions