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
0c16ddf7
Commit
0c16ddf7
authored
31 years ago
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build_c_cast): When casting to union, if value is array
or function, do default_conversion. From-SVN: r4926
parent
c8ab4464
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
gcc/c-typeck.c
+4
-0
No files found.
gcc/c-typeck.c
View file @
0c16ddf7
...
...
@@ -3854,6 +3854,10 @@ build_c_cast (type, expr)
else
if
(
TREE_CODE
(
type
)
==
UNION_TYPE
)
{
tree
field
;
if
(
TREE_CODE
(
TREE_TYPE
(
value
))
==
ARRAY_TYPE
||
TREE_CODE
(
TREE_TYPE
(
value
))
==
FUNCTION_TYPE
)
value
=
default_conversion
(
value
);
for
(
field
=
TYPE_FIELDS
(
type
);
field
;
field
=
TREE_CHAIN
(
field
))
if
(
comptypes
(
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
field
)),
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
value
))))
...
...
This diff is collapsed.
Click to expand it.
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