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
e2aab13d
Commit
e2aab13d
authored
Aug 14, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(truthvalue_conversion): Optionally warn if an
unparenthesized assignment is used as a truth value. From-SVN: r1853
parent
390e01bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
gcc/c-common.c
+5
-0
No files found.
gcc/c-common.c
View file @
e2aab13d
...
@@ -901,6 +901,11 @@ truthvalue_conversion (expr)
...
@@ -901,6 +901,11 @@ truthvalue_conversion (expr)
fold
(
build1
(
NOP_EXPR
,
fold
(
build1
(
NOP_EXPR
,
TREE_TYPE
(
TREE_OPERAND
(
expr
,
0
)),
TREE_TYPE
(
TREE_OPERAND
(
expr
,
0
)),
TREE_OPERAND
(
expr
,
1
))),
1
);
TREE_OPERAND
(
expr
,
1
))),
1
);
case
MODIFY_EXPR
:
if
(
warn_parentheses
&&
C_EXP_ORIGINAL_CODE
(
expr
)
==
MODIFY_EXPR
)
warning
(
"suggest parentheses around assignment used as truth value"
);
break
;
}
}
return
build_binary_op
(
NE_EXPR
,
expr
,
integer_zero_node
,
1
);
return
build_binary_op
(
NE_EXPR
,
expr
,
integer_zero_node
,
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