[Bug c++/79687] [5/6/7 Regression] Wrong code with pointer-to-member

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 23 16:56:00 GMT 2017


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;
}


More information about the Gcc-bugs mailing list