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
cff9c407
Commit
cff9c407
authored
Aug 02, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(lvalue_p, case BIND_EXPR, RTL_EXPR): Return 1 if array.
From-SVN: r14626
parent
5a03c8c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
gcc/c-typeck.c
+17
-12
No files found.
gcc/c-typeck.c
View file @
cff9c407
...
...
@@ -1016,19 +1016,19 @@ default_conversion (exp)
if
(
TREE_CODE
(
exp
)
==
COMPONENT_REF
&&
DECL_BIT_FIELD
(
TREE_OPERAND
(
exp
,
1
)))
{
tree
width
=
DECL_SIZE
(
TREE_OPERAND
(
exp
,
1
));
HOST_WIDE_INT
low
=
TREE_INT_CST_LOW
(
width
);
tree
width
=
DECL_SIZE
(
TREE_OPERAND
(
exp
,
1
));
HOST_WIDE_INT
low
=
TREE_INT_CST_LOW
(
width
);
/* If it's thinner than an int, promote it like a
C_PROMOTING_INTEGER_TYPE_P, otherwise leave it alone. */
/* If it's thinner than an int, promote it like a
C_PROMOTING_INTEGER_TYPE_P, otherwise leave it alone. */
if
(
low
<
TYPE_PRECISION
(
integer_type_node
))
{
if
(
flag_traditional
&&
TREE_UNSIGNED
(
type
))
return
convert
(
unsigned_type_node
,
exp
);
else
return
convert
(
integer_type_node
,
exp
);
}
if
(
low
<
TYPE_PRECISION
(
integer_type_node
))
{
if
(
flag_traditional
&&
TREE_UNSIGNED
(
type
))
return
convert
(
unsigned_type_node
,
exp
);
else
return
convert
(
integer_type_node
,
exp
);
}
}
if
(
C_PROMOTING_INTEGER_TYPE_P
(
type
))
...
...
@@ -1085,7 +1085,7 @@ default_conversion (exp)
TREE_OPERAND
(
exp
,
0
),
op1
);
}
if
(
!
lvalue_p
(
exp
)
if
(
!
lvalue_p
(
exp
)
&&
!
(
TREE_CODE
(
exp
)
==
CONSTRUCTOR
&&
TREE_STATIC
(
exp
)))
{
error
(
"invalid use of non-lvalue array"
);
...
...
@@ -3183,6 +3183,11 @@ lvalue_p (ref)
&&
TREE_CODE
(
TREE_TYPE
(
ref
))
!=
METHOD_TYPE
)
return
1
;
break
;
case
BIND_EXPR
:
case
RTL_EXPR
:
if
(
TREE_CODE
(
TREE_TYPE
(
ref
))
==
ARRAY_TYPE
)
return
1
;
}
return
0
;
}
...
...
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