https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123977
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |101603
Keywords| |rejects-valid
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
With -fno-checking, trunk rejects it:
```
<source>: In instantiation of 'static void TestCaseImp<CallSig>::run() [with
CallSig = void*&(...) const volatile]':
required from here
<source>:11:48:
11 | TestCaseImp<void *&(...) const volatile>::run;
| ^
<source>:8:23: error: no matches converting function 'f' to type 'void*&
(struct MemFun03::*)(...) const volatile'
8 | static void run() { (CallSig(MemFun03::*)) &MemFun03::f; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
• there are 2 candidates
• candidate 1: 'void MemFun03::f()'
<source>:5:8:
5 | void f();
| ^
• candidate 2: 'void*& MemFun03::f(...) const volatile'
<source>:4:5:
4 | R f(...) const volatile;
| ^
```
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603
[Bug 101603] [meta-bug] pointer to member functions issues