diff options
author | Marek Polacek <polacek@redhat.com> | 2016-04-13 16:00:52 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-04-13 16:00:52 +0000 |
commit | 99cd9857c01234bb5b6cbff54e1bd2a400c04179 (patch) | |
tree | 7962ab3337ef28f108f4429418332c990368a28b /gcc/c/c-tree.h | |
parent | 5267cfcc82d1ea904335486e476c4945ad4da6e7 (diff) | |
download | gcc-99cd9857c01234bb5b6cbff54e1bd2a400c04179.zip gcc-99cd9857c01234bb5b6cbff54e1bd2a400c04179.tar.gz gcc-99cd9857c01234bb5b6cbff54e1bd2a400c04179.tar.bz2 |
re PR c/70436 (-Wparentheses missing ambiguous else warning)
PR c/70436
* c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
adjust callers.
(c_parser_statement): Likewise.
(c_parser_c99_block_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_if_body): Don't set IF_P here.
(c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
about dangling else here.
* c-tree.h (c_finish_if_stmt): Adjust declaration.
* c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
warn about dangling else here.
* testsuite/gcc.dg/Wparentheses-12.c: New test.
* testsuite/gcc.dg/Wparentheses-13.c: New test.
From-SVN: r234949
Diffstat (limited to 'gcc/c/c-tree.h')
-rw-r--r-- | gcc/c/c-tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 96ab049..d559207 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -641,7 +641,7 @@ extern tree build_asm_stmt (tree, tree); extern int c_types_compatible_p (tree, tree); extern tree c_begin_compound_stmt (bool); extern tree c_end_compound_stmt (location_t, tree, bool); -extern void c_finish_if_stmt (location_t, tree, tree, tree, bool); +extern void c_finish_if_stmt (location_t, tree, tree, tree); extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, bool); extern tree c_begin_stmt_expr (void); extern tree c_finish_stmt_expr (location_t, tree); |