[Bug c++/115964] New: GCC accepts invalid program with explicit object member function overloads
jlame646 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 17 08:06:38 GMT 2024
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
More information about the Gcc-bugs
mailing list