Date
2024-03-15.00:00:00
Message id
7318

Content

[Accepted as a DR at the March, 2024 meeting.]

Consider:

  struct C { static int foo; };
  C* c = nullptr;

The behavior of (*c).foo is clearly undefined per 7.6.1.5 [expr.ref] paragraph 1:

The postfix expression before the dot or arrow is evaluated ...

However, the treatment of c->foo is less clear, because the transformation to the form (*(E1)).E2 occurs later.