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
1ff1a2d2
Commit
1ff1a2d2
authored
Mar 19, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(grokdeclarator): Use signed version of `sizetype' for type of array
index. From-SVN: r6822
parent
79c844cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
gcc/c-decl.c
+6
-3
No files found.
gcc/c-decl.c
View file @
1ff1a2d2
...
...
@@ -4220,6 +4220,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
register
tree
size
=
TREE_OPERAND
(
declarator
,
1
);
/* An uninitialized decl with `extern' is a reference. */
int
extern_ref
=
!
initialized
&&
(
specbits
&
(
1
<<
(
int
)
RID_EXTERN
));
/* The index is a signed object `sizetype' bits wide. */
tree
index_type
=
signed_type
(
sizetype
);
declarator
=
TREE_OPERAND
(
declarator
,
0
);
...
...
@@ -4292,10 +4294,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
}
}
/* Convert size to
size
type, so that if it is a variable
/* Convert size to
index_
type, so that if it is a variable
the computations will be done in the proper mode. */
itype
=
fold
(
build
(
MINUS_EXPR
,
sizetype
,
convert
(
sizetype
,
size
),
size_one_node
));
itype
=
fold
(
build
(
MINUS_EXPR
,
index_type
,
convert
(
index_type
,
size
),
convert
(
index_type
,
size_one_node
)));
if
(
size_varies
)
itype
=
variable_size
(
itype
);
...
...
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