https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101747
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-08-03 CC| |msebor at gcc dot gnu.org Keywords| |rejects-valid Ever confirmed|0 |1 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- I suppose the return type of the allocator could be used for the disambiguation. The difficulty here is that the attribute handler is in code shared by the C and C++ front ends with no good way to call a language-specific routine to do overload resolution. Maybe the attribute should accept a string with the mangled name of the function in addition to a function name. IIRC, attribute copy has the same limitation.