https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107624
Bug ID: 107624 Summary: Wrong code with static operator () Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- In: struct S { static void operator() (int); static void baz (int); }; S &foo (int); void bar () { foo (0) (0); foo (1).baz (1); } we transform the latter into *foo (1), S::baz (1), but the former into just S::operator() (0) - the side-effects on the postfix-expression are gone. Shouldn't we add that somewhere as COMPOUND_EXPR when we select a static operator() (ditto for static operator[])?