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
f52b5958
Commit
f52b5958
authored
Oct 05, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(make_node, case 'd'): Refine in which obstack PARM_DECLs are
allocated. From-SVN: r5624
parent
ba2e110c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
gcc/tree.c
+15
-14
No files found.
gcc/tree.c
View file @
f52b5958
...
@@ -792,25 +792,26 @@ make_node (code)
...
@@ -792,25 +792,26 @@ make_node (code)
/* All decls in an inline function need to be saved. */
/* All decls in an inline function need to be saved. */
if
(
obstack
!=
&
permanent_obstack
)
if
(
obstack
!=
&
permanent_obstack
)
obstack
=
saveable_obstack
;
obstack
=
saveable_obstack
;
/* PARM_DECLs always go on saveable_obstack, not permanent,
even though we may make them before the function turns
/* PARM_DECLs go on the context of the parent. If this is a nested
on temporary allocation. */
function, then we must allocate the PARM_DECL on the parent's
else
if
(
code
==
PARM_DECL
)
obstack, so that they will live to the end of the parent's
closing brace. This is neccesary in case we try to inline the
function into its parent.
PARM_DECLs of top-level functions do not have this problem. However,
we allocate them where we put the FUNCTION_DECL for languauges such as
Ada that need to consult some flags in the PARM_DECLs of the function
when calling it. */
else
if
(
code
==
PARM_DECL
&&
obstack
!=
&
permanent_obstack
)
{
{
tree
context
=
0
;
tree
context
=
0
;
if
(
current_function_decl
)
if
(
current_function_decl
)
context
=
decl_function_context
(
current_function_decl
);
context
=
decl_function_context
(
current_function_decl
);
/* If this is a nested function, then we must allocate the PARM_DECL
on the parent's saveable_obstack, so that they will live to the
end of the parent's closing brace. This is neccesary in case we
try to inline the function into its parent. */
if
(
context
)
if
(
context
)
{
obstack
struct
function
*
p
=
find_function_data
(
context
);
=
find_function_data
(
context
)
->
function_obstack
;
obstack
=
p
->
function_maybepermanent_obstack
;
}
else
obstack
=
function_maybepermanent_obstack
;
}
}
break
;
break
;
...
...
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