annotate gcc/testsuite/c-c++-common/attributes-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-prune-output "undeclared here \\(not in a function\\); did you mean .char..|\[^\n\r\]* was not declared in this scope" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,bar))); /* { dg-warning "outside range" } */
kono
parents:
diff changeset
5 void* my_realloc(void*, unsigned) __attribute__((alloc_size(bar))); /* { dg-warning "outside range" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 typedef char vec __attribute__((vector_size(bar))); /* { dg-warning "ignored" } */
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 void f1(char*) __attribute__((nonnull(bar))); /* { dg-error "invalid operand" } */
kono
parents:
diff changeset
10 void f2(char*) __attribute__((nonnull(1,bar))); /* { dg-error "invalid operand" } */
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 void foo(void);
kono
parents:
diff changeset
13 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,foo))); /* { dg-warning "outside range" } */
kono
parents:
diff changeset
14 void* my_realloc(void*, unsigned) __attribute__((alloc_size(foo))); /* { dg-warning "outside range" } */
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 typedef char vec __attribute__((vector_size(foo))); /* { dg-warning "ignored" } */
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 void f1(char*) __attribute__((nonnull(foo))); /* { dg-error "invalid operand" } */
kono
parents:
diff changeset
19 void f2(char*) __attribute__((nonnull(1,foo))); /* { dg-error "invalid operand" } */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 void g() __attribute__((aligned(foo))); /* { dg-error "invalid value|not an integer" } */