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++/79687] [5/6/7 Regression] Wrong code with pointer-to-member


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79687

--- Comment #15 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Slightly reduced original testcase:

struct A
{
  char c;
};

int main()
{
  static char A::* const q = nullptr;
  A a;
  return &(a.*q) - &a.c;
}

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