diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-07-12 17:34:45 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-07-12 15:34:45 +0000 |
commit | c59f7203283d1faa48a42075eef2a07ca0454a21 (patch) | |
tree | 1adb11d45425fbb14d0386855458008952151853 /gcc/tree.c | |
parent | 3720cb58e82397f33d85e92ef37aa2665b650f55 (diff) | |
download | gcc-c59f7203283d1faa48a42075eef2a07ca0454a21.zip gcc-c59f7203283d1faa48a42075eef2a07ca0454a21.tar.gz gcc-c59f7203283d1faa48a42075eef2a07ca0454a21.tar.bz2 |
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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))); } |