[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / c-c++-common / attr-nocf-check-1.c
blob15f69731b9194e30c53c7be44ae0c2a3ce8d8564
1 /* { dg-do compile } */
3 int func (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
4 int (*fptr) (int) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
5 typedef void (*nocf_check_t) (void) __attribute__ ((nocf_check)); /* { dg-warning "'nocf_check' attribute ignored" } */
7 int
8 foo1 (int arg)
10 return func (arg) + fptr (arg);
13 void
14 foo2 (void (*foo) (void))
16 void (*func) (void) __attribute__((nocf_check)) = foo; /* { dg-warning "'nocf_check' attribute ignored" } */
17 func ();
20 void
21 foo3 (nocf_check_t foo)
23 foo ();
26 void
27 foo4 (void (*foo) (void) __attribute__((nocf_check))) /* { dg-warning "'nocf_check' attribute ignored" } */
29 foo ();