blob: 55578628716b17622e2bab955f3b5ee7938b2b27 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// RUN: %clang_cc1 %s -fsyntax-only -verify
// rdar://10095762
typedef void (*Fn_noret)(void) __attribute__((noreturn));
typedef void (*Fn_ret)(void);
void foo(void);
void foo_noret(void) __attribute__((noreturn));
void test() {
Fn_noret fn2 = &foo; // expected-warning {{incompatible pointer types initializing 'Fn_noret'}}
Fn_noret fn3 = &foo_noret;
Fn_ret fn4 = &foo_noret;
Fn_ret fn5 = &foo;
}
|