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
b8c21346
Commit
b8c21346
authored
May 06, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(comptypes): An enum type if compatible with type of same signedness
as well as precision. From-SVN: r7227
parent
c9325fd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
gcc/c-typeck.c
+4
-3
No files found.
gcc/c-typeck.c
View file @
b8c21346
...
@@ -398,12 +398,13 @@ comptypes (type1, type2)
...
@@ -398,12 +398,13 @@ comptypes (type1, type2)
if
(
t1
==
t2
||
TREE_CODE
(
t1
)
==
ERROR_MARK
||
TREE_CODE
(
t2
)
==
ERROR_MARK
)
if
(
t1
==
t2
||
TREE_CODE
(
t1
)
==
ERROR_MARK
||
TREE_CODE
(
t2
)
==
ERROR_MARK
)
return
1
;
return
1
;
/* Treat an enum type as the unsigned integer type of the same width. */
/* Treat an enum type as the integer type of the same width and
signedness. */
if
(
TREE_CODE
(
t1
)
==
ENUMERAL_TYPE
)
if
(
TREE_CODE
(
t1
)
==
ENUMERAL_TYPE
)
t1
=
type_for_size
(
TYPE_PRECISION
(
t1
),
1
);
t1
=
type_for_size
(
TYPE_PRECISION
(
t1
),
TREE_UNSIGNED
(
t1
)
);
if
(
TREE_CODE
(
t2
)
==
ENUMERAL_TYPE
)
if
(
TREE_CODE
(
t2
)
==
ENUMERAL_TYPE
)
t2
=
type_for_size
(
TYPE_PRECISION
(
t2
),
1
);
t2
=
type_for_size
(
TYPE_PRECISION
(
t2
),
TREE_UNSIGNED
(
t2
)
);
if
(
t1
==
t2
)
if
(
t1
==
t2
)
return
1
;
return
1
;
...
...
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