* c.opt (Wdangling-else): New option.
* c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
OPT_Wdangling_else.
* parser.c (cp_parser_selection_statement): Replace OPT_Wparentheses
with OPT_Wdangling_else.
* doc/invoke.texi: Document -Wdangling-else.
* c-c++-common/Wdangling-else-1.c: New test.
* c-c++-common/Wdangling-else-2.c: New test.
* c-c++-common/Wdangling-else-3.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235885 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed: