Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/lto/odr-3_1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 typedef struct YYSTYPE { // { dg-lto-message "type" 2 } | |
2 // We get two notes here: | |
3 // note: a different type is defined in another translation unit | |
4 // note: a type with different number of fields is defined in another translation unit | |
5 } YYSTYPE; | |
6 union yyalloc { // { dg-lto-message "type" 2 } | |
7 // We get here three notes: | |
8 // note: a different type is defined in another translation unit | |
9 // note: type 'union yyalloc' itself violates the C++ One Definition Rule | |
10 short yyss; | |
11 YYSTYPE yyvs; // { dg-lto-message "field of same name but different type is defined in another translation unit" } | |
12 | |
13 }; | |
14 | |
15 yyalloc a; // { dg-lto-message "'a' was previously declared here" } | |
16 |