This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/83895] New: -Wparentheses warns about pointer-to-member typedefs
- From: "ville.voutilainen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 16 Jan 2018 14:22:24 +0000
- Subject: [Bug c++/83895] New: -Wparentheses warns about pointer-to-member typedefs
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83895
Bug ID: 83895
Summary: -Wparentheses warns about pointer-to-member typedefs
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
Target Milestone: ---
Test:
struct X;
typedef int (X::*foo);
gcc diagnoses this with
warning: unnecessary parentheses in declaration of 'foo' [-Wparentheses]
There's no danger of the code being interpreted as a function call. The
parentheses are superfluous but harmless.