File: auto-type-2.c

package info (click to toggle)
gcc-riscv64-unknown-elf 8.3.0.2019.08%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680,956 kB
  • sloc: ansic: 3,237,715; cpp: 896,882; ada: 772,854; f90: 144,254; asm: 68,788; makefile: 67,456; sh: 29,743; exp: 28,045; objc: 15,273; fortran: 11,885; python: 7,369; pascal: 5,375; awk: 3,725; perl: 2,872; yacc: 316; xml: 311; ml: 285; lex: 198; haskell: 122
file content (23 lines) | stat: -rw-r--r-- 1,262 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Test __auto_type.  Test invalid uses.  */
/* { dg-do compile } */
/* { dg-options "" } */

__auto_type; /* { dg-error "empty declaration" } */
__auto_type *p = (int *) 0; /* { dg-error "plain identifier" } */
struct s0 { int i : 1; } x;
void f (void) { __auto_type v = x.i; } /* { dg-error "bit-field initializer" } */
__auto_type i; /* { dg-error "initialized data declaration" } */
__auto_type g { } /* { dg-error "initialized data declaration" } */
__auto_type a = 1, b = 2; /* { dg-error "single declarator" } */
__auto_type long e0 = 0; /* { dg-error "__auto_type" } */
__auto_type short e1 = 0; /* { dg-error "__auto_type" } */
__auto_type signed e2 = 0; /* { dg-error "__auto_type" } */
__auto_type unsigned e3 = 0; /* { dg-error "__auto_type" } */
__auto_type _Complex e4 = 0; /* { dg-error "__auto_type" } */
long __auto_type e5 = 0; /* { dg-error "__auto_type" } */
short __auto_type e6 = 0; /* { dg-error "__auto_type" } */
signed __auto_type e7 = 0; /* { dg-error "__auto_type" } */
unsigned __auto_type e8 = 0; /* { dg-error "__auto_type" } */
_Complex __auto_type e9 = 0; /* { dg-error "__auto_type" } */
int __auto_type e10 = 0; /* { dg-error "two or more data types" } */
__auto_type _Bool e11 = 0; /* { dg-error "two or more data types" } */