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
8706edbc
Commit
8706edbc
authored
Sep 28, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build_unary_op): Address of nested fcn isn't constant.
From-SVN: r2268
parent
bcea2185
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
gcc/c-typeck.c
+9
-4
No files found.
gcc/c-typeck.c
View file @
8706edbc
...
...
@@ -228,9 +228,11 @@ common_type (t1, t2)
else
return
t2
;
case
POINTER_TYPE
:
#if 0
/* For two pointers, do this recursively on the target type,
and combine the qualifiers of the two types' targets. */
/* This code was turned off; I don't know why.
But ANSI C specifies doing this with the qualifiers.
So I turned it on again. */
{
tree
target
=
common_type
(
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
t1
)),
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
t2
)));
...
...
@@ -240,8 +242,9 @@ common_type (t1, t2)
=
TYPE_VOLATILE
(
TREE_TYPE
(
t1
))
||
TYPE_VOLATILE
(
TREE_TYPE
(
t2
));
return
build_pointer_type
(
c_build_type_variant
(
target
,
constp
,
volatilep
));
}
#
endif
#
if 0
return build_pointer_type (common_type (TREE_TYPE (t1), TREE_TYPE (t2)));
#endif
case
ARRAY_TYPE
:
{
...
...
@@ -3167,8 +3170,10 @@ build_unary_op (code, xarg, noconvert)
addr
=
build1
(
code
,
argtype
,
arg
);
/* Address of a static or external variable or
function counts as a constant. */
if
(
staticp
(
arg
))
file-scope function counts as a constant. */
if
(
staticp
(
arg
)
&&
!
(
TREE_CODE
(
arg
)
==
FUNCTION_DECL
&&
DECL_CONTEXT
(
arg
)
!=
0
))
TREE_CONSTANT
(
addr
)
=
1
;
return
addr
;
}
...
...
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