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

            Bug ID: 115964
           Summary: GCC accepts invalid program with explicit object
                    member function overloads
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jlame646 at gmail dot com
  Target Milestone: ---

The following invalid program is accepted by gcc. Demo:
https://godbolt.org/z/dG4qEKzb5

```
struct C {
       void j(this const C);
       void j() const ;      //gcc ok, clang: nope, edg:ok         

       void f(this C );   
       void f(C);               //gcc ok, clang ok, edg:nope
};

```
Both these overloads are ill-formed as explained here:
https://stackoverflow.com/questions/78758215/explicit-member-function-discrepancies-between-different-compilers

Reply via email to