Re: [PATCH] C++ warning on vexing parse
authorNathan Sidwell <nathan@acm.org>
Thu, 5 Oct 2017 13:27:37 +0000 (13:27 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 5 Oct 2017 13:27:37 +0000 (13:27 +0000)
commit807e3be2b82b3e15572ac6b0128e9b7dd306fdc4
treecb5e29d8ce9047c30566c15d6f09c02ec94c2909
parent87e3d7cfb5c5c9cf265e5ee803cce904f2a5a123
Re: [PATCH] C++ warning on vexing parse

https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00249.html
gcc/cp/
Warn on MVP declarations
* cp-tree.h (struct cp_declarator): Add parenthesized field.
* decl.c (grokdeclarator): Warn about unnecessary parens.
* parser.c (make_declarator): Init parenthesized field.
(cp_parser_direct_declarator): Set parenthesized field.

gcc/
* doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.

gcc/testsuite/
* g++.dg/warn/mvp.C: New.

From-SVN: r253446
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/parser.c
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/mvp.C [new file with mode: 0644]