On Mon, 30 Mar 2015, Jan Hubicka wrote: > Hi, > when compiling C++ program that define different number of virtual method > in different classes, we output warnings about their virtual tables > being of different type. THese warnings looks ugly and we are able > to diagnose the situation in more sensible way. > > This patch simply silences all warnings on artificial decls. > > Bootstrapped/regtested x86_64-linux OK?
Hum... but do ODR warnings cover all other cases here? Well, the warnings won't be useful to users I suppose. Thus, ok. Thanks, Richard. > Honza > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > artificial decls. > Index: lto/lto-symtab.c > =================================================================== > --- lto/lto-symtab.c (revision 221757) > +++ lto/lto-symtab.c (working copy) > @@ -473,7 +473,8 @@ lto_symtab_merge_decls_2 (symtab_node *f > if (TREE_PUBLIC (e->decl)) > { > if (!lto_symtab_merge (prevailing, e) > - && !diagnosed_p) > + && !diagnosed_p > + && !DECL_ARTIFICIAL (e->decl)) > mismatches.safe_push (e->decl); > } > if (mismatches.is_empty ()) > > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton HRB 21284 (AG Nuernberg)