Mercurial > hg > CbC > CbC_llvm
comparison clang/test/Sema/internal_linkage.c @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
4 int var2 __attribute__((internal_linkage,common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \ | 4 int var2 __attribute__((internal_linkage,common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \ |
5 // expected-note{{conflicting attribute is here}} | 5 // expected-note{{conflicting attribute is here}} |
6 int var3 __attribute__((common,internal_linkage)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \ | 6 int var3 __attribute__((common,internal_linkage)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \ |
7 // expected-note{{conflicting attribute is here}} | 7 // expected-note{{conflicting attribute is here}} |
8 | 8 |
9 int var4 __attribute__((common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} \ | 9 int var4 __attribute__((common)); // expected-note{{previous definition is here}} expected-note{{conflicting attribute is here}} |
10 // expected-note{{previous definition is here}} | 10 int var4 __attribute__((internal_linkage)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} \ |
11 int var4 __attribute__((internal_linkage)); // expected-note{{conflicting attribute is here}} \ | 11 // expected-error{{'internal_linkage' attribute does not appear on the first declaration of 'var4'}} |
12 // expected-error{{'internal_linkage' attribute does not appear on the first declaration of 'var4'}} | |
13 | 12 |
14 int var5 __attribute__((internal_linkage)); // expected-error{{'internal_linkage' and 'common' attributes are not compatible}} | 13 int var5 __attribute__((internal_linkage)); // expected-note{{conflicting attribute is here}} |
15 int var5 __attribute__((common)); // expected-note{{conflicting attribute is here}} | 14 int var5 __attribute__((common)); // expected-error{{'common' and 'internal_linkage' attributes are not compatible}} |
16 | 15 |
17 __attribute__((internal_linkage)) int f() {} | 16 __attribute__((internal_linkage)) int f() {} |
18 struct __attribute__((internal_linkage)) S { // expected-warning{{'internal_linkage' attribute only applies to variables, functions, and classes}} | 17 struct __attribute__((internal_linkage)) S { // expected-warning{{'internal_linkage' attribute only applies to variables, functions, and classes}} |
19 }; | 18 }; |
20 | 19 |