summaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2017-07-31 14:43:24 +0200
committerMartin Jambor <mjambor@suse.cz>2017-07-31 14:43:24 +0200
commitb32f12dece884f1fa0f04c643a77105aff6ce8bc (patch)
treecdab5f10806561fc198f907299b0e55eb5701ef0 /gcc/cp/rtti.c
parent166bec868d991fdf71f9a66f994e5977fcab4aa2 (diff)
parenta168a775e93ec31ae743ad282d8e60fa1c116891 (diff)
downloadgcc-gcn.tar.gz
Merge branch 'master' into gcngcn
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index ff72ce538b2..a660cdd9413 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "intl.h"
#include "stor-layout.h"
#include "c-family/c-pragma.h"
+#include "gcc-rich-location.h"
/* C++ returns type information to the user in struct type_info
objects. We also use type information to implement dynamic_cast and
@@ -316,7 +317,12 @@ typeid_ok_p (void)
if (!COMPLETE_TYPE_P (const_type_info_type_node))
{
- error ("must %<#include <typeinfo>%> before using %<typeid%>");
+ gcc_rich_location richloc (input_location);
+ maybe_add_include_fixit (&richloc, "<typeinfo>");
+ error_at_rich_loc (&richloc,
+ "must %<#include <typeinfo>%> before using"
+ " %<typeid%>");
+
return false;
}
@@ -1556,7 +1562,7 @@ emit_support_tinfos (void)
bltn_type = TREE_TYPE (bltn_type);
if (!COMPLETE_TYPE_P (bltn_type))
return;
- tree dtor = CLASSTYPE_DESTRUCTORS (bltn_type);
+ tree dtor = CLASSTYPE_DESTRUCTOR (bltn_type);
if (!dtor || DECL_EXTERNAL (dtor))
return;