[Bug c++/84287] pointer to member function type with dependent parameter cannot be mangled

2021-07-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84287

Andrew Pinski  changed:

   What|Removed |Added

 Blocks||101603
   Last reconfirmed|2018-02-08 00:00:00 |2021-7-23

--- Comment #2 from Andrew Pinski  ---
clang mangles the function as:
_Z1gIiEiT_PDTscM1SFvRKS0_EadL_ZNS1_1fERKiEE

Which demangles as:
int g(int, decltype (static_cast(::f)))


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603
[Bug 101603] [meta-bug] pointer to member functions issues

[Bug c++/84287] pointer to member function type with dependent parameter cannot be mangled

2018-02-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84287

Martin Sebor  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-02-08
 CC||msebor at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||4.1.0, 4.5.4, 4.8.3, 4.9.3,
   ||5.3.0, 6.2.0, 7.1.0, 8.0

--- Comment #1 from Martin Sebor  ---
Confirmed with the C++ 98 test case below.  Not a regression.

$ cat t.C && gcc -S -Wall t.C
struct S {
  void f (const S&);
};

template
int g (T x, __typeof__ (static_cast(::f)) * = 0)
{
  return 0;
}

int x = g (S ());
t.C: In instantiation of ‘int g(T, __typeof__ (static_cast(& S::f))*) [with T = S]’:
t.C:6:5: sorry, unimplemented: mangling typeof, use decltype instead
 int g (T x, __typeof__ (static_cast(::f)) * = 0)
 ^