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
6bc4e3d0
Commit
6bc4e3d0
authored
Mar 02, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build_unary_op): Warn if increment `struct unknown *'.
From-SVN: r3585
parent
42981920
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
gcc/c-typeck.c
+10
-3
No files found.
gcc/c-typeck.c
View file @
6bc4e3d0
...
@@ -3014,9 +3014,16 @@ build_unary_op (code, xarg, noconvert)
...
@@ -3014,9 +3014,16 @@ build_unary_op (code, xarg, noconvert)
if
(
typecode
==
POINTER_TYPE
)
if
(
typecode
==
POINTER_TYPE
)
{
{
if
((
pedantic
||
warn_pointer_arith
)
/* If pointer target is an undefined struct,
&&
(
TREE_CODE
(
TREE_TYPE
(
result_type
))
==
FUNCTION_TYPE
we just cannot know how to do the arithmetic. */
||
TREE_CODE
(
TREE_TYPE
(
result_type
))
==
VOID_TYPE
))
if
(
TYPE_SIZE
(
TREE_TYPE
(
result_type
))
==
0
)
error
(
"%s of pointer to unknown structure"
,
((
code
==
PREINCREMENT_EXPR
||
code
==
POSTINCREMENT_EXPR
)
?
"increment"
:
"decrement"
));
else
if
((
pedantic
||
warn_pointer_arith
)
&&
(
TREE_CODE
(
TREE_TYPE
(
result_type
))
==
FUNCTION_TYPE
||
TREE_CODE
(
TREE_TYPE
(
result_type
))
==
VOID_TYPE
))
pedwarn
(
"wrong type argument to %s"
,
pedwarn
(
"wrong type argument to %s"
,
((
code
==
PREINCREMENT_EXPR
((
code
==
PREINCREMENT_EXPR
||
code
==
POSTINCREMENT_EXPR
)
||
code
==
POSTINCREMENT_EXPR
)
...
...
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