diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/cp/rtti.c | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r-- | gcc/cp/rtti.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 5a33b83..fcb3308 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -433,7 +433,7 @@ get_tinfo_decl_direct (tree type, tree name, int pseudo_ix) if (!name) name = mangle_typeinfo_for_type (type); - if (!CLASS_TYPE_P (type)) + if (!CLASS_TYPE_P (type) || TYPE_TRANSPARENT_AGGR (type)) d = get_global_binding (name); if (!d) @@ -536,14 +536,14 @@ build_if_nonnull (tree test, tree result, tsubst_flags_t complain) /* This is a compiler generated comparison, don't emit e.g. -Wnonnull-compare warning for it. */ - TREE_NO_WARNING (cond) = 1; + suppress_warning (cond, OPT_Wnonnull); null_ptr = cp_convert (TREE_TYPE (result), nullptr_node, complain); cond = build3 (COND_EXPR, TREE_TYPE (result), cond, result, null_ptr); /* Likewise, don't emit -Wnonnull for using the result to call a member function. */ - TREE_NO_WARNING (cond) = 1; + suppress_warning (cond, OPT_Wnonnull); return cond; } |