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
ea8dd784
Commit
ea8dd784
authored
May 06, 1993
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(pointer_diff): Error if op1 is pointer to incomplete type.
From-SVN: r4367
parent
9ea0a753
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
gcc/c-typeck.c
+4
-0
No files found.
gcc/c-typeck.c
View file @
ea8dd784
...
...
@@ -2944,6 +2944,10 @@ pointer_diff (op0, op1)
op0
=
build_binary_op
(
MINUS_EXPR
,
convert
(
restype
,
op0
),
convert
(
restype
,
op1
),
1
);
/* This generates an error if op1 is pointer to incomplete type. */
if
(
TYPE_SIZE
(
TREE_TYPE
(
TREE_TYPE
(
op1
)))
==
0
)
error
(
"arithmetic on pointer to an incomplete type"
);
/* This generates an error if op0 is pointer to incomplete type. */
op1
=
c_size_in_bytes
(
target_type
);
/* Divide by the size, in easiest possible way. */
...
...
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