Commit c59f7203 by Jan Hubicka Committed by Jan Hubicka

tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIC on builtin types.


	* tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIC
	on builtin types.
	* ipa-devirt.c: Include stor-layout.h and intl.h
	(odr_subtypes_equivalent_p): New function.
	(warn_odr): New function.
	(warn_type_mismatch): New function.
	(odr_types_equivalent_p): New function.
	(add_type_duplicate): Use it.
	* common.opt (Wodr): New flag.
	* doc/invoke.texi (Wodr): Document new warning.

From-SVN: r212481
parent 3720cb58
2014-07-12 Jan Hubicka <hubicka@ucw.cz>
* tree.c (type_in_anonymous_namespace_p): Ignore TREE_PUBLIC
on builtin types.
* ipa-devirt.c: Include stor-layout.h and intl.h
(odr_subtypes_equivalent_p): New function.
(warn_odr): New function.
(warn_type_mismatch): New function.
(odr_types_equivalent_p): New function.
(add_type_duplicate): Use it.
* common.opt (Wodr): New flag.
* doc/invoke.texi (Wodr): Document new warning.
2014-07-12 Jan Hubicka <hubicka@ucw.cz>
* timevar.def (TV_IPA_LTO_DECL_INIT_IO): Remove.
(TV_IPA_LTO_CTORS_IN, TV_IPA_LTO_CTORS_OUT): New timevar.
* cgraph.c (cgraph_get_body): Push GIMPLE_IN timevar.
......
......@@ -587,6 +587,10 @@ Warn if the loop cannot be optimized due to nontrivial assumptions.
Wmissing-noreturn
Common Alias(Wsuggest-attribute=noreturn)
Wodr
Common Warning
Warn about some C++ One Definition Rule violations during link time optimization
Woverflow
Common Var(warn_overflow) Init(1) Warning
Warn about overflow in arithmetic expressions
......
......@@ -260,7 +260,7 @@ Objective-C and Objective-C++ Dialects}.
-Wlogical-op -Wlogical-not-parentheses -Wlong-long @gol
-Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-field-initializers @gol
-Wmissing-include-dirs @gol
-Wno-multichar -Wnonnull -Wno-overflow -Wopenmp-simd @gol
-Wno-multichar -Wnonnull -Wodr -Wno-overflow -Wopenmp-simd @gol
-Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol
-Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
-Wpointer-arith -Wno-pointer-to-int-cast @gol
......@@ -4915,6 +4915,12 @@ attribute.
@opindex Woverflow
Do not warn about compile-time overflow in constant expressions.
@opindex Wodr
@opindex Wno-odr
@opindex Wodr
Warn about One Definition Rule violations during link time optimization.
Require @option{-flto-odr-type-merging} to be enabled. Enabled by default
@item -Wopenmp-simd
@opindex Wopenm-simd
Warn if the vectorizer cost model overrides the OpenMP or the Cilk Plus
......
......@@ -11864,6 +11864,10 @@ obj_type_ref_class (tree ref)
bool
type_in_anonymous_namespace_p (const_tree t)
{
/* TREE_PUBLIC of TYPE_STUB_DECL may not be properly set for
bulitin types; those have CONTEXT NULL. */
if (!TYPE_CONTEXT (t))
return false;
return (TYPE_STUB_DECL (t) && !TREE_PUBLIC (TYPE_STUB_DECL (t)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment