[Bug c++/83592] [8 Regression] Annoying -Wparentheses warnings
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 2 17:38:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83592
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
IOW:
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -10866,10 +10866,11 @@ grokdeclarator (const cp_declarator *declarator,
inner_declarator = declarator->declarator;
- /* We don't want to warn in parmeter context because we don't
+ /* We don't want to warn in parameter context because we don't
yet know if the parse will succeed, and this might turn out
to be a constructor call. */
if (decl_context != PARM
+ && decl_context != TYPENAME
&& declarator->parenthesized != UNKNOWN_LOCATION
/* If the type is class-like and the inner name used a
global namespace qualifier, we need the parens.
More information about the Gcc-bugs
mailing list