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
ff3225e7
Commit
ff3225e7
authored
Mar 14, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build_binary_op, pop_init_level, output_pending_init_elements): Call
tree_int_cst_sgn. From-SVN: r6776
parent
6aa10371
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
gcc/c-typeck.c
+10
-9
No files found.
gcc/c-typeck.c
View file @
ff3225e7
...
@@ -2037,7 +2037,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -2037,7 +2037,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
{
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
{
{
if
(
tree_int_cst_
lt
(
op1
,
integer_zero_node
)
)
if
(
tree_int_cst_
sgn
(
op1
)
<
0
)
warning
(
"right shift count is negative"
);
warning
(
"right shift count is negative"
);
else
else
{
{
...
@@ -2069,7 +2069,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -2069,7 +2069,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
{
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
{
{
if
(
tree_int_cst_
lt
(
op1
,
integer_zero_node
)
)
if
(
tree_int_cst_
sgn
(
op1
)
<
0
)
warning
(
"left shift count is negative"
);
warning
(
"left shift count is negative"
);
else
if
(
TREE_INT_CST_HIGH
(
op1
)
!=
0
else
if
(
TREE_INT_CST_HIGH
(
op1
)
!=
0
||
((
unsigned
HOST_WIDE_INT
)
TREE_INT_CST_LOW
(
op1
)
||
((
unsigned
HOST_WIDE_INT
)
TREE_INT_CST_LOW
(
op1
)
...
@@ -2097,7 +2097,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
...
@@ -2097,7 +2097,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p)
{
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
)
{
{
if
(
tree_int_cst_
lt
(
op1
,
integer_zero_node
)
)
if
(
tree_int_cst_
sgn
(
op1
)
<
0
)
warning
(
"shift count is negative"
);
warning
(
"shift count is negative"
);
else
if
(
TREE_INT_CST_HIGH
(
op1
)
!=
0
else
if
(
TREE_INT_CST_HIGH
(
op1
)
!=
0
||
((
unsigned
HOST_WIDE_INT
)
TREE_INT_CST_LOW
(
op1
)
||
((
unsigned
HOST_WIDE_INT
)
TREE_INT_CST_LOW
(
op1
)
...
@@ -5397,9 +5397,10 @@ pop_init_level (implicit)
...
@@ -5397,9 +5397,10 @@ pop_init_level (implicit)
TREE_TYPE
(
maxindex
)
=
TYPE_DOMAIN
(
constructor_type
);
TREE_TYPE
(
maxindex
)
=
TYPE_DOMAIN
(
constructor_type
);
if
(
pedantic
if
(
pedantic
&&
tree_int_cst_lt
(
TYPE_MAX_VALUE
(
TYPE_DOMAIN
(
constructor_type
)),
&&
(
tree_int_cst_sgn
(
TYPE_MAX_VALUE
(
TYPE_DOMAIN
(
constructor_type
)))
integer_zero_node
))
<=
0
))
error_with_decl
(
constructor_decl
,
"zero-size array `%s'"
);
error_with_decl
(
constructor_decl
,
"zero or negative array size `%s'"
);
layout_type
(
constructor_type
);
layout_type
(
constructor_type
);
size
=
int_size_in_bytes
(
constructor_type
);
size
=
int_size_in_bytes
(
constructor_type
);
pop_obstacks
();
pop_obstacks
();
...
@@ -5736,7 +5737,8 @@ output_pending_init_elements (all)
...
@@ -5736,7 +5737,8 @@ output_pending_init_elements (all)
if
(
tree_int_cst_equal
(
TREE_PURPOSE
(
tail
),
if
(
tree_int_cst_equal
(
TREE_PURPOSE
(
tail
),
constructor_unfilled_index
))
constructor_unfilled_index
))
{
{
output_init_element
(
TREE_VALUE
(
tail
),
TREE_TYPE
(
constructor_type
),
output_init_element
(
TREE_VALUE
(
tail
),
TREE_TYPE
(
constructor_type
),
constructor_unfilled_index
,
0
);
constructor_unfilled_index
,
0
);
goto
retry
;
goto
retry
;
}
}
...
@@ -5744,8 +5746,7 @@ output_pending_init_elements (all)
...
@@ -5744,8 +5746,7 @@ output_pending_init_elements (all)
constructor_unfilled_index
))
constructor_unfilled_index
))
;
;
else
if
(
next
==
0
else
if
(
next
==
0
||
tree_int_cst_lt
(
TREE_PURPOSE
(
tail
),
||
tree_int_cst_lt
(
TREE_PURPOSE
(
tail
),
next
))
next
))
next
=
TREE_PURPOSE
(
tail
);
next
=
TREE_PURPOSE
(
tail
);
}
}
else
if
(
TREE_CODE
(
constructor_type
)
==
RECORD_TYPE
else
if
(
TREE_CODE
(
constructor_type
)
==
RECORD_TYPE
...
...
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