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
6aa10371
Commit
6aa10371
authored
Mar 14, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(finish_{decl,struct,enum}): Call tree_int_cst_sgn.
From-SVN: r6775
parent
6d9cb074
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
gcc/c-decl.c
+4
-5
No files found.
gcc/c-decl.c
View file @
6aa10371
...
...
@@ -3461,9 +3461,8 @@ finish_decl (decl, init, asmspec_tree)
}
if
(
pedantic
&&
TYPE_DOMAIN
(
type
)
!=
0
&&
tree_int_cst_lt
(
TYPE_MAX_VALUE
(
TYPE_DOMAIN
(
type
)),
integer_zero_node
))
error_with_decl
(
decl
,
"zero-size array `%s'"
);
&&
tree_int_cst_sgn
(
TYPE_MAX_VALUE
(
TYPE_DOMAIN
(
type
)))
<=
0
)
error_with_decl
(
decl
,
"zero or negative size array `%s'"
);
layout_decl
(
decl
,
0
);
}
...
...
@@ -5276,7 +5275,7 @@ finish_struct (t, fieldlist)
{
unsigned
HOST_WIDE_INT
width
=
TREE_INT_CST_LOW
(
DECL_INITIAL
(
x
));
if
(
tree_int_cst_
lt
(
DECL_INITIAL
(
x
),
integer_zero_node
)
)
if
(
tree_int_cst_
sgn
(
DECL_INITIAL
(
x
))
<
0
)
{
DECL_INITIAL
(
x
)
=
NULL
;
error_with_decl
(
x
,
"negative width in bit-field `%s'"
);
...
...
@@ -5622,7 +5621,7 @@ finish_enum (enumtype, values)
layout_type
(
enumtype
);
/* An enum can have some negative values; then it is signed. */
TREE_UNSIGNED
(
enumtype
)
=
!
tree_int_cst_lt
(
minnode
,
integer_zero_node
)
;
TREE_UNSIGNED
(
enumtype
)
=
tree_int_cst_sgn
(
minnode
)
>=
0
;
/* Change the type of the enumerators to be the enum type.
Formerly this was done only for enums that fit in an int,
...
...
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