PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / auto-type-2.c
blob761671b3c5a46ea419555db882f30cb1a78f13f6
1 /* Test __auto_type. Test invalid uses. */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 __auto_type; /* { dg-error "empty declaration" } */
6 __auto_type *p = (int *) 0; /* { dg-error "plain identifier" } */
7 struct s0 { int i : 1; } x;
8 void f (void) { __auto_type v = x.i; } /* { dg-error "bit-field initializer" } */
9 __auto_type i; /* { dg-error "initialized data declaration" } */
10 __auto_type g { } /* { dg-error "initialized data declaration" } */
11 __auto_type a = 1, b = 2; /* { dg-error "single declarator" } */
12 __auto_type long e0 = 0; /* { dg-error "__auto_type" } */
13 __auto_type short e1 = 0; /* { dg-error "__auto_type" } */
14 __auto_type signed e2 = 0; /* { dg-error "__auto_type" } */
15 __auto_type unsigned e3 = 0; /* { dg-error "__auto_type" } */
16 __auto_type _Complex e4 = 0; /* { dg-error "__auto_type" } */
17 long __auto_type e5 = 0; /* { dg-error "__auto_type" } */
18 short __auto_type e6 = 0; /* { dg-error "__auto_type" } */
19 signed __auto_type e7 = 0; /* { dg-error "__auto_type" } */
20 unsigned __auto_type e8 = 0; /* { dg-error "__auto_type" } */
21 _Complex __auto_type e9 = 0; /* { dg-error "__auto_type" } */
22 int __auto_type e10 = 0; /* { dg-error "two or more data types" } */
23 __auto_type _Bool e11 = 0; /* { dg-error "two or more data types" } */