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
d9a9c5a7
Commit
d9a9c5a7
authored
Apr 28, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(convert_to_integer): When we want to return zero, be sure we honor
any side-effects in our operand. From-SVN: r4255
parent
3dc4a939
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
gcc/convert.c
+16
-5
No files found.
gcc/convert.c
View file @
d9a9c5a7
...
...
@@ -199,11 +199,22 @@ convert_to_integer (type, expr)
/* In this case, shifting is like multiplication. */
goto
trunc1
;
else
/* If it is >= that width, result is zero.
Handling this with trunc1 would give the wrong result:
(int) ((long long) a << 32) is well defined (as 0)
but (int) a << 32 is undefined and would get a warning. */
return
convert_to_integer
(
type
,
integer_zero_node
);
{
/* If it is >= that width, result is zero.
Handling this with trunc1 would give the wrong result:
(int) ((long long) a << 32) is well defined (as 0)
but (int) a << 32 is undefined and would get a
warning. */
tree
t
=
convert_to_integer
(
type
,
integer_zero_node
);
/* If the original expression had side-effects, we must
preserve it. */
if
(
TREE_SIDE_EFFECTS
(
expr
))
return
build
(
COMPOUND_EXPR
,
type
,
expr
,
t
);
else
return
t
;
}
}
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