comparison gcc/testsuite/gcc.dg/Wc99-c11-compat-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu99 -pedantic -Wc99-c11-compat" } */
3
4 struct S { int i; struct { int a; }; }; /* { dg-warning "ISO C99 doesn.t support unnamed structs/unions" } */
5 _Noreturn void foo (void); /* { dg-warning "ISO C99 does not support ._Noreturn." } */
6 typedef int A;
7 typedef int A; /* { dg-warning "redefinition of typedef .A." } */
8 _Thread_local int i; /* { dg-warning "ISO C99 does not support ._Thread_local." } */
9 _Static_assert (1, "foo"); /* { dg-warning "ISO C99 does not support ._Static_assert." } */
10 _Atomic int a; /* { dg-warning "ISO C99 does not support the ._Atomic. qualifier" } */
11 _Alignas (int) int aa; /* { dg-warning "ISO C99 does not support ._Alignas." } */
12 enum e { E = _Alignof (double) }; /* { dg-warning "ISO C99 does not support ._Alignof." } */
13
14 void
15 fn (int n)
16 {
17 _Generic (n, int: 0); /* { dg-warning "ISO C99 does not support ._Generic." } */
18 }