| 1 |
/* |
| 2 |
RUN: %clang_cc1 %s -std=gnu89 -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-GNU89 %s -allow-empty |
| 3 |
RUN: %clang_cc1 %s -std=gnu89 -pedantic -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-GNU89-PEDANTIC %s |
| 4 |
*/ |
| 5 |
|
| 6 |
typedef const int t; |
| 7 |
const t c_i; |
| 8 |
/* |
| 9 |
CHECK-GNU89-NOT: 7:1: warning: duplicate 'const' declaration specifier |
| 10 |
CHECK-GNU89-PEDANTIC: 7:1: warning: duplicate 'const' declaration specifier |
| 11 |
*/ |
| 12 |
|
| 13 |
const int c_i2; |
| 14 |
const typeof(c_i2) c_i3; |
| 15 |
/* |
| 16 |
CHECK-GNU89-NOT: 14:7: warning: extension used |
| 17 |
CHECK-GNU89-NOT: 14:1: warning: duplicate 'const' declaration specifier |
| 18 |
CHECK-GNU89-PEDANTIC: 14:7: warning: extension used |
| 19 |
CHECK-GNU89-PEDANTIC: 14:1: warning: duplicate 'const' declaration specifier |
| 20 |
*/ |