aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/search.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-08-07 01:01:54 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-08-06 21:01:54 -0400
commit6ad073329cea8de835c2939dfb40c305f5568b72 (patch)
tree0207ce2b34a5962b32c2886da0b90ccf59340bee /gcc/cp/search.c
parent446588abcb3251b1ef52cdab8f7b761354c1f8d6 (diff)
downloadgcc-6ad073329cea8de835c2939dfb40c305f5568b72.zip
gcc-6ad073329cea8de835c2939dfb40c305f5568b72.tar.gz
gcc-6ad073329cea8de835c2939dfb40c305f5568b72.tar.bz2
decl.c (lookup_name_real): Set the complain flag if we're looking for a namespace member.
* decl.c (lookup_name_real): Set the complain flag if we're looking for a namespace member. * lex.c (real_yylex): We can have a number with no digits. * cvt.c (cp_convert_to_pointer): Don't force pmf conversions. * search.c (binfo_from_vbase): New fn. * cp-tree.h: Declare it. * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion from pointer to member of virtual base. * typeck.c (get_delta_difference): Likewise. From-SVN: r28560
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r--gcc/cp/search.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 14e1ce9..dc898cd 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -3315,3 +3315,17 @@ binfo_for_vtable (var)
return dfs_walk_real (TYPE_BINFO (type),
0, dfs_bfv_helper, dfs_bfv_queue_p, &bfvi);
}
+
+/* Returns 1 iff BINFO is from a direct or indirect virtual base. */
+
+int
+binfo_from_vbase (binfo)
+ tree binfo;
+{
+ for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo))
+ {
+ if (TREE_VIA_VIRTUAL (binfo))
+ return 1;
+ }
+ return 0;
+}