This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/83895] New: -Wparentheses warns about pointer-to-member typedefs


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]