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
82bde854
Commit
82bde854
authored
Jan 25, 1993
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not give a warning for a plain 0 used in a pointer context.
From-SVN: r3322
parent
21cd4ffc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
gcc/c-typeck.c
+12
-2
No files found.
gcc/c-typeck.c
View file @
82bde854
...
@@ -56,6 +56,8 @@ static void pedantic_lvalue_warning ();
...
@@ -56,6 +56,8 @@ static void pedantic_lvalue_warning ();
tree
truthvalue_conversion
();
tree
truthvalue_conversion
();
void
incomplete_type_error
();
void
incomplete_type_error
();
void
readonly_warning
();
void
readonly_warning
();
static
tree
internal_build_compound_expr
();
/* Do `exp = require_complete_type (exp);' to make sure exp
/* Do `exp = require_complete_type (exp);' to make sure exp
does not have an incomplete type. (That includes void types.) */
does not have an incomplete type. (That includes void types.) */
...
@@ -3633,6 +3635,14 @@ tree
...
@@ -3633,6 +3635,14 @@ tree
build_compound_expr
(
list
)
build_compound_expr
(
list
)
tree
list
;
tree
list
;
{
{
internal_build_compound_expr
(
list
,
TRUE
);
}
static
tree
internal_build_compound_expr
(
list
,
first_p
)
tree
list
;
int
first_p
;
{
register
tree
rest
;
register
tree
rest
;
if
(
TREE_CHAIN
(
list
)
==
0
)
if
(
TREE_CHAIN
(
list
)
==
0
)
...
@@ -3646,7 +3656,7 @@ build_compound_expr (list)
...
@@ -3646,7 +3656,7 @@ build_compound_expr (list)
#endif
#endif
/* Don't let (0, 0) be null pointer constant. */
/* Don't let (0, 0) be null pointer constant. */
if
(
integer_zerop
(
TREE_VALUE
(
list
)))
if
(
!
first_p
&&
integer_zerop
(
TREE_VALUE
(
list
)))
return
non_lvalue
(
TREE_VALUE
(
list
));
return
non_lvalue
(
TREE_VALUE
(
list
));
return
TREE_VALUE
(
list
);
return
TREE_VALUE
(
list
);
}
}
...
@@ -3659,7 +3669,7 @@ build_compound_expr (list)
...
@@ -3659,7 +3669,7 @@ build_compound_expr (list)
=
default_conversion
(
TREE_VALUE
(
TREE_CHAIN
(
list
)));
=
default_conversion
(
TREE_VALUE
(
TREE_CHAIN
(
list
)));
}
}
rest
=
build_compound_expr
(
TREE_CHAIN
(
list
)
);
rest
=
internal_build_compound_expr
(
TREE_CHAIN
(
list
),
FALSE
);
if
(
!
TREE_SIDE_EFFECTS
(
TREE_VALUE
(
list
)))
if
(
!
TREE_SIDE_EFFECTS
(
TREE_VALUE
(
list
)))
return
rest
;
return
rest
;
...
...
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