https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101869
Bug ID: 101869 Summary: [9/10/11/12 Regression] &enumclass::enumvalue is rejected Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: enum E { A }; E operator & (E e) { return e; } E f(void) { return &E::A; } ------ CUT ---- This used to work in GCC 4.7.x and stopped working in GCC 4.8.x. Puting parentheses around E::A allows it work.