https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98436
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Samuel Benjamin from comment #4) > I got your point, But why is this working with 64bit and other gcc versions > other than 7.4.0 - 32 bit ? Undefined behaviour means anything can happen, including appearing to work as you expect. Implementing C++ member functions as non-member functions is indeed undefined behaviour. Even naming your function "_ZN7MyClass17myUndefinedMethodEv" is undefined, because that's a reserved name.