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
a29f2ec1
Commit
a29f2ec1
authored
Jul 06, 1993
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(build_conditional_expr): All simplified results
must go through pedantic_non_lvalue. From-SVN: r4865
parent
8ac1abdf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
gcc/c-typeck.c
+3
-3
No files found.
gcc/c-typeck.c
View file @
a29f2ec1
...
@@ -3590,7 +3590,7 @@ build_conditional_expr (ifexp, op1, op2)
...
@@ -3590,7 +3590,7 @@ build_conditional_expr (ifexp, op1, op2)
&& TREE_CODE (TREE_TYPE (op1)) != FUNCTION_TYPE)
&& TREE_CODE (TREE_TYPE (op1)) != FUNCTION_TYPE)
{
{
if (TREE_CODE (ifexp) == INTEGER_CST)
if (TREE_CODE (ifexp) == INTEGER_CST)
return (integer_zerop (ifexp) ? op2 : op1);
return
pedantic_non_lvalue
(integer_zerop (ifexp) ? op2 : op1);
return fold (build (COND_EXPR, TREE_TYPE (op1), ifexp, op1, op2));
return fold (build (COND_EXPR, TREE_TYPE (op1), ifexp, op1, op2));
}
}
...
@@ -3715,7 +3715,7 @@ build_conditional_expr (ifexp, op1, op2)
...
@@ -3715,7 +3715,7 @@ build_conditional_expr (ifexp, op1, op2)
{
{
result_type = TREE_TYPE (op1);
result_type = TREE_TYPE (op1);
if (TREE_CONSTANT (ifexp))
if (TREE_CONSTANT (ifexp))
return (integer_zerop (ifexp) ? op2 : op1);
return
pedantic_non_lvalue
(integer_zerop (ifexp) ? op2 : op1);
if (TYPE_MODE (result_type) == BLKmode)
if (TYPE_MODE (result_type) == BLKmode)
{
{
...
@@ -3748,7 +3748,7 @@ build_conditional_expr (ifexp, op1, op2)
...
@@ -3748,7 +3748,7 @@ build_conditional_expr (ifexp, op1, op2)
#endif /* 0 */
#endif /* 0 */
if
(
TREE_CODE
(
ifexp
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
ifexp
)
==
INTEGER_CST
)
return
integer_zerop
(
ifexp
)
?
op2
:
op1
;
return
pedantic_non_lvalue
(
integer_zerop
(
ifexp
)
?
op2
:
op1
)
;
return
fold
(
build
(
COND_EXPR
,
result_type
,
ifexp
,
op1
,
op2
));
return
fold
(
build
(
COND_EXPR
,
result_type
,
ifexp
,
op1
,
op2
));
}
}
...
...
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