int f() __attribute__((deprecated)); void g() __attribute__((deprecated));
void g();
extern int var __attribute__((deprecated));
int a() {
int (*ptr)() = f; f();
g();
return var; }
extern int var; int w() {
return var; }
int old_fn() __attribute__ ((deprecated));
int old_fn(); int (*fn_ptr)() = old_fn;
int old_fn() {
return old_fn()+1; }
struct foo {
int x __attribute__((deprecated)); };
void test1(struct foo *F) {
++F->x; struct foo f1 = { .x = 17 }; struct foo f2 = { 17 }; }
typedef struct foo foo_dep __attribute__((deprecated)); foo_dep *test2;
struct __attribute__((deprecated,
invalid_attribute)) bar_dep ;
struct bar_dep *test3;
foo_dep *test4 __attribute__((deprecated));
struct bar_dep *test5 __attribute__((deprecated));
typedef foo_dep test6(struct bar_dep*); typedef foo_dep test7(struct bar_dep*) __attribute__((deprecated));
int test8(char *p) {
p += sizeof(foo_dep);
foo_dep *ptr; ptr = (foo_dep*) p;
int func(foo_dep *foo); return func(ptr);
}
foo_dep *test9(void) __attribute__((deprecated));
foo_dep *test9(void) {
void* myalloc(unsigned long);
foo_dep *ptr
= (foo_dep*)
myalloc(sizeof(foo_dep));
return ptr;
}
void test10(void) __attribute__((deprecated));
void test10(void) {
if (sizeof(foo_dep) == sizeof(void*)) {
}
foo_dep *localfunc(void);
foo_dep localvar;
}
char test11[sizeof(foo_dep)] __attribute__((deprecated));
char test12[sizeof(foo_dep)];
int test13(foo_dep *foo) __attribute__((deprecated));
int test14(foo_dep *foo);
unsigned long test15 = sizeof(foo_dep); unsigned long test16 __attribute__((deprecated))
= sizeof(foo_dep);
foo_dep test17, test18 __attribute__((deprecated)),
test19;
enum __attribute__((deprecated)) Test20 { test20_a __attribute__((deprecated)), test20_b };
void test20() {
enum Test20 f; f = test20_a; f = test20_b; }
char test21[__has_feature(attribute_deprecated_with_message) ? 1 : -1];
struct test22 {
foo_dep a __attribute((deprecated));
foo_dep b; foo_dep c, d __attribute((deprecated)); __attribute((deprecated)) foo_dep e, f;
};