1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// PR C++/2213 // Origin: philippeb@corel.com // Copyright (C), 2002 Free Software Foundation // Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> // { dg-do compile } class QObject { }; int main() { long long m; (void (QObject::*)()) m; // { dg-error "invalid cast" "" } }