Mercurial > hg > CbC > CbC_gcc
view 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 |
line wrap: on
line source
typedef struct YYSTYPE { // { dg-lto-message "type" 2 } // We get two notes here: // note: a different type is defined in another translation unit // note: a type with different number of fields is defined in another translation unit } YYSTYPE; union yyalloc { // { dg-lto-message "type" 2 } // We get here three notes: // note: a different type is defined in another translation unit // note: type 'union yyalloc' itself violates the C++ One Definition Rule short yyss; YYSTYPE yyvs; // { dg-lto-message "field of same name but different type is defined in another translation unit" } }; yyalloc a; // { dg-lto-message "'a' was previously declared here" }