diff options
Diffstat (limited to 'test/SemaCXX/reinterpret-cast.cpp')
-rw-r--r-- | test/SemaCXX/reinterpret-cast.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/reinterpret-cast.cpp b/test/SemaCXX/reinterpret-cast.cpp index 91b72cc02207..be960a3af8b5 100644 --- a/test/SemaCXX/reinterpret-cast.cpp +++ b/test/SemaCXX/reinterpret-cast.cpp @@ -88,3 +88,9 @@ void memptrs() (void)reinterpret_cast<void (structure::*)()>(0); // expected-error {{reinterpret_cast from 'int' to 'void (struct structure::*)()' is not allowed}} (void)reinterpret_cast<int structure::*>(0); // expected-error {{reinterpret_cast from 'int' to 'int struct structure::*' is not allowed}} } + +// PR5545 +class A; +class B; +void (A::*a)(); +void (B::*b)() = reinterpret_cast<void (B::*)()>(a); |