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
47ee6837
Commit
47ee6837
authored
28 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build_binary_op): Likewise.
(build_conditional_expr): op1 now always nonnull. From-SVN: r13234
parent
e78a3b42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
gcc/c-typeck.c
+4
-13
No files found.
gcc/c-typeck.c
View file @
47ee6837
...
...
@@ -2107,7 +2107,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
case
RSHIFT_EXPR
:
if
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
)
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
&&
skip_evaluation
==
0
)
{
if
(
tree_int_cst_sgn
(
op1
)
<
0
)
warning
(
"right shift count is negative"
);
...
...
@@ -2139,7 +2139,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
case
LSHIFT_EXPR
:
if
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
)
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
&&
skip_evaluation
==
0
)
{
if
(
tree_int_cst_sgn
(
op1
)
<
0
)
warning
(
"left shift count is negative"
);
...
...
@@ -2167,7 +2167,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
case
LROTATE_EXPR
:
if
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
)
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
&&
skip_evaluation
==
0
)
{
if
(
tree_int_cst_sgn
(
op1
)
<
0
)
warning
(
"shift count is negative"
);
...
...
@@ -2469,7 +2469,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
converted
=
1
;
resultcode
=
xresultcode
;
if
(
warn_sign_compare
)
if
(
warn_sign_compare
&&
skip_evaluation
==
0
)
{
int
op0_signed
=
!
TREE_UNSIGNED
(
TREE_TYPE
(
orig_op0
));
int
op1_signed
=
!
TREE_UNSIGNED
(
TREE_TYPE
(
orig_op1
));
...
...
@@ -3377,15 +3377,6 @@ build_conditional_expr (ifexp, op1, op2)
register
tree
result_type
=
NULL
;
tree
orig_op1
=
op1
,
orig_op2
=
op2
;
/* If second operand is omitted, it is the same as the first one;
make sure it is calculated only once. */
if
(
op1
==
0
)
{
if
(
pedantic
)
pedwarn
(
"ANSI C forbids omitting the middle term of a ?: expression"
);
ifexp
=
orig_op1
=
op1
=
save_expr
(
ifexp
);
}
ifexp
=
truthvalue_conversion
(
default_conversion
(
ifexp
));
#if 0 /* Produces wrong result if within sizeof. */
...
...
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