File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ void (*fp2)(int) = func2;
5757void func3 (int ) __cfi_salt ("pepper "); // ok
5858void func3 (int a ) __cfi_salt ("pepper ") { } // ok
5959void (* __cfi_salt ("pepper ") fp3 )(int ) = func3 ; // ok
60+ void (* fp3_noattr )(int ) = func3 ;
61+ // expected-error@-1{{incompatible function pointer types initializing 'void (*)(int)' with an expression of type 'void (int)'}}
6062
6163void func4 (int ) [[clang ::cfi_salt ("test ")]]; // ok
6264void func4 (int a ) [[clang ::cfi_salt ("test" )]] { } // ok
6365void (* [[clang ::cfi_salt ("test" )]] fp4 )(int ) = func4 ; // ok
66+ void (* fp4_noattr )(int ) = func4 ;
67+ // expected-error@-1{{incompatible function pointer types initializing 'void (*)(int)' with an expression of type 'void (int)'}}
You can’t perform that action at this time.
0 commit comments