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
b00b4b88
Commit
b00b4b88
authored
Dec 05, 2003
by
Peter Gerwinski
Committed by
Richard Henderson
Dec 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree.def (PLACEHOLDER_EXPR): Clarify commentary.
From-SVN: r74322
parent
5b4994bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
gcc/ChangeLog
+4
-0
gcc/tree.def
+12
-2
No files found.
gcc/ChangeLog
View file @
b00b4b88
2003-12-05 Peter Gerwinski <peter@gerwinski.de>
* tree.def (PLACEHOLDER_EXPR): Clarify commentary.
2003-12-05 Steven Bosscher <stevenb@suse.de>
* config/d30v/d30v-protos.h , config/d30v/d30v.c,
...
...
gcc/tree.def
View file @
b00b4b88
...
...
@@ -509,7 +509,8 @@ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", 'e', 1)
some field in an object of the type contains a value that is used in
the computation of another field's offset or size and/or the size of
the type. The positions and/or sizes of fields can vary from object
to object of the same type.
to object of the same type or even for one and the same object within
its scope.
Record types with discriminants in Ada or schema types in Pascal are
examples of such types. This mechanism is also used to create "fat
...
...
@@ -533,7 +534,16 @@ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", 'e', 1)
For example, if your type FOO is a RECORD_TYPE with a field BAR,
and you need the value of <variable>.BAR to calculate TYPE_SIZE
(FOO), just substitute <variable> above with a PLACEHOLDER_EXPR
what contains both the expression we wish to
whose TREE_TYPE is FOO. Then construct your COMPONENT_REF with
the PLACEHOLDER_EXPR as the first operand (which has the correct
type). Later, when the size is needed in the program, the back-end
will find this PLACEHOLDER_EXPR and generate code to calculate the
actual size at run-time. In the following, we describe how this
calculation is done.
When we wish to evaluate a size or offset, we check whether it
contains a PLACEHOLDER_EXPR. If it does, we construct a
WITH_RECORD_EXPR that contains both the expression we wish to
evaluate and an expression within which the object may be found.
The latter expression is the object itself in the simple case of an
Ada record with discriminant, but it can be the array in the case of
...
...
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