Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
6bc34b14
Commit
6bc34b14
authored
Jan 22, 2002
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* class.c (build_base_path): Tweak formatting.
From-SVN: r49075
parent
cf403648
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
gcc/cp/ChangeLog
+7
-1
gcc/cp/class.c
+11
-9
No files found.
gcc/cp/ChangeLog
View file @
6bc34b14
2002-01-22 Jason Merrill <jason@redhat.com>
* class.c (build_base_path): Tweak formatting.
2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
Fix regression introduced with patch for c++/775
...
...
@@ -25,6 +29,7 @@
2002-01-10 Ira Ruben <ira@apple.com>
PR c++/907
* decl.c (start_method): Handle attrlist.
2002-01-10 Jakub Jelinek <jakub@redhat.com>
...
...
@@ -40,7 +45,7 @@
2002-01-09 Graham Stott <grahams@redhat.com>
* decl.h (
grokdeclarator): Wrap long line.
* decl.h (grokdeclarator): Wrap long line.
* semantics.c (FINISH_COND): Uppercase macro paramaters and
add parenthesis.
...
...
@@ -86,6 +91,7 @@
* decl2.c (coerce_new_type): Downgrade error for size_t mismatch
to pedwarn.
PR c++/3536
* method.c (make_thunk): If !flag_weak, give the thunk the
function's linkage.
(use_thunk): Here, too.
...
...
gcc/cp/class.c
View file @
6bc34b14
...
...
@@ -252,7 +252,7 @@ build_base_path (code, expr, binfo, nonnull)
int
nonnull
;
{
tree
v_binfo
=
NULL_TREE
;
tree
t
;
tree
d_binfo
=
NULL_TREE
;
tree
probe
;
tree
offset
;
tree
target_type
;
...
...
@@ -264,10 +264,12 @@ build_base_path (code, expr, binfo, nonnull)
if
(
expr
==
error_mark_node
||
binfo
==
error_mark_node
||
!
binfo
)
return
error_mark_node
;
for
(
probe
=
binfo
;
probe
;
t
=
probe
,
probe
=
BINFO_INHERITANCE_CHAIN
(
probe
))
for
(
probe
=
binfo
;
probe
;
probe
=
BINFO_INHERITANCE_CHAIN
(
probe
))
{
d_binfo
=
probe
;
if
(
!
v_binfo
&&
TREE_VIA_VIRTUAL
(
probe
))
v_binfo
=
probe
;
}
probe
=
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
expr
));
if
(
want_pointer
)
...
...
@@ -276,13 +278,13 @@ build_base_path (code, expr, binfo, nonnull)
my_friendly_assert
(
code
==
MINUS_EXPR
?
same_type_p
(
BINFO_TYPE
(
binfo
),
probe
)
:
code
==
PLUS_EXPR
?
same_type_p
(
BINFO_TYPE
(
t
),
probe
)
?
same_type_p
(
BINFO_TYPE
(
d_binfo
),
probe
)
:
false
,
20010723
);
if
(
code
==
MINUS_EXPR
&&
v_binfo
)
{
error
(
"cannot convert from base `%T' to derived type `%T' via virtual base `%T'"
,
BINFO_TYPE
(
binfo
),
BINFO_TYPE
(
t
),
BINFO_TYPE
(
v_binfo
));
BINFO_TYPE
(
binfo
),
BINFO_TYPE
(
d_binfo
),
BINFO_TYPE
(
v_binfo
));
return
error_mark_node
;
}
...
...
@@ -303,12 +305,12 @@ build_base_path (code, expr, binfo, nonnull)
if
(
v_binfo
&&
!
fixed_type_p
)
{
/* Going via virtual base V_BINFO. We need the static offset
from V_BINFO to BINFO, and the dynamic offset from
T
to
V_BINFO. That offset is an entry in
T
's vtable. */
from V_BINFO to BINFO, and the dynamic offset from
D_BINFO
to
V_BINFO. That offset is an entry in
D_BINFO
's vtable. */
tree
v_offset
=
build_vfield_ref
(
build_indirect_ref
(
expr
,
NULL
),
TREE_TYPE
(
TREE_TYPE
(
expr
)));
v_binfo
=
binfo_for_vbase
(
BINFO_TYPE
(
v_binfo
),
BINFO_TYPE
(
t
));
v_binfo
=
binfo_for_vbase
(
BINFO_TYPE
(
v_binfo
),
BINFO_TYPE
(
d_binfo
));
v_offset
=
build
(
PLUS_EXPR
,
TREE_TYPE
(
v_offset
),
v_offset
,
BINFO_VPTR_FIELD
(
v_binfo
));
...
...
@@ -326,7 +328,7 @@ build_base_path (code, expr, binfo, nonnull)
offset
=
v_offset
;
}
target_type
=
code
==
PLUS_EXPR
?
BINFO_TYPE
(
binfo
)
:
BINFO_TYPE
(
t
);
target_type
=
code
==
PLUS_EXPR
?
BINFO_TYPE
(
binfo
)
:
BINFO_TYPE
(
d_binfo
);
target_type
=
cp_build_qualified_type
(
target_type
,
cp_type_quals
(
TREE_TYPE
(
TREE_TYPE
(
expr
))));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment