diff options
Diffstat (limited to 'test/SemaCXX/MicrosoftCompatibility-cxx98.cpp')
-rw-r--r-- | test/SemaCXX/MicrosoftCompatibility-cxx98.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp b/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp index bfda837..3b80d09 100644 --- a/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp +++ b/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp @@ -12,3 +12,12 @@ void (*PR23733_1)() = static_cast<FnPtrTy>((void *)0); // expected-warning {{sta void (*PR23733_2)() = FnPtrTy((void *)0); void (*PR23733_3)() = (FnPtrTy)((void *)0); void (*PR23733_4)() = reinterpret_cast<FnPtrTy>((void *)0); + +long function_prototype(int a); +long (*function_ptr)(int a); + +void function_to_voidptr_conv() { + void *a1 = function_prototype; // expected-warning {{implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension}} + void *a2 = &function_prototype; // expected-warning {{implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension}} + void *a3 = function_ptr; // expected-warning {{implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension}} +} |