aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-05-05 15:26:59 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-05-05 15:26:59 +0200
commit351f85c5be3287b3ab495195ff15c5fedf09303f (patch)
treeb1c40179c0f161d00823019b5aa3295ab05f47ee /gcc/cp/parser.c
parentf5c40ce2cf8812d28e4738143a491bd77c0a0ce0 (diff)
downloadgcc-351f85c5be3287b3ab495195ff15c5fedf09303f.zip
gcc-351f85c5be3287b3ab495195ff15c5fedf09303f.tar.gz
gcc-351f85c5be3287b3ab495195ff15c5fedf09303f.tar.bz2
c-parser.c (c_parser_switch_statement): Add IF_P argument, parse it through to c_parser_c99_block_statement.
* c-parser.c (c_parser_switch_statement): Add IF_P argument, parse it through to c_parser_c99_block_statement. (c_parser_statement_after_labels): Adjust c_parser_switch_statement caller. * parser.c (cp_parser_selection_statement): For RID_SWITCH, pass if_p instead of NULL to cp_parser_implicitly_scoped_statement. * c-c++-common/Wdangling-else-4.c: New test. From-SVN: r235920
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index da2ee3c..f4c6f74 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -10978,7 +10978,7 @@ cp_parser_selection_statement (cp_parser* parser, bool *if_p,
in_statement = parser->in_statement;
parser->in_switch_statement_p = true;
parser->in_statement |= IN_SWITCH_STMT;
- cp_parser_implicitly_scoped_statement (parser, NULL,
+ cp_parser_implicitly_scoped_statement (parser, if_p,
guard_tinfo);
parser->in_switch_statement_p = in_switch_statement_p;
parser->in_statement = in_statement;