summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-26 02:00:10 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-26 02:00:10 +0000
commit424c597eadffdf1dc8ada7ebadfc26d49be9ee13 (patch)
tree03ba04a07dd494b26e1c229fe9d6a3f6199d5040
parent44bf35d8c49c53fd8e1b1d4846588154b7697640 (diff)
downloadgcc-424c597eadffdf1dc8ada7ebadfc26d49be9ee13.tar.gz
* cp/search.c (lookup_base_r): Declare bk in variable declaration
space. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47333 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/search.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3512f20ae8c..0284cccb0b6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-25 Aldy Hernandez <aldyh@redhat.com>
+
+ * cp/search.c (lookup_base_r): Declare bk in variable declaration
+ space.
+
2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
PR g++/3145
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 3bc6d9dbfbc..87ebddb3217 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -477,6 +477,7 @@ lookup_base_r (binfo, base, access, within_current_scope,
tree base_binfo = TREE_VEC_ELT (bases, i);
int this_non_public = is_non_public;
int this_virtual = is_virtual;
+ base_kind bk;
if (access <= ba_ignore)
; /* no change */
@@ -494,10 +495,10 @@ lookup_base_r (binfo, base, access, within_current_scope,
if (TREE_VIA_VIRTUAL (base_binfo))
this_virtual = 1;
- base_kind bk = lookup_base_r (base_binfo, base,
- access, within_current_scope,
- this_non_public, this_virtual,
- binfo_ptr);
+ bk = lookup_base_r (base_binfo, base,
+ access, within_current_scope,
+ this_non_public, this_virtual,
+ binfo_ptr);
switch (bk)
{