projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b1dffa
)
Comment change.
author
Richard Stallman
<rms@gnu.org>
Tue, 13 Apr 1993 20:33:27 +0000
(20:33 +0000)
committer
Richard Stallman
<rms@gnu.org>
Tue, 13 Apr 1993 20:33:27 +0000
(20:33 +0000)
From-SVN: r4130
gcc/fold-const.c
patch
|
blob
|
history
diff --git
a/gcc/fold-const.c
b/gcc/fold-const.c
index 02d40275a7009db88042cdfd0b1d7d9c3d61eebb..a7994aead79235a17dfaf32062ca6fbf71420b1f 100644
(file)
--- a/
gcc/fold-const.c
+++ b/
gcc/fold-const.c
@@
-1628,6
+1628,9
@@
non_lvalue (x)
{
if (TREE_CODE (x) == INTEGER_CST && integer_zerop (x))
{
+ /* Use NOP_EXPR instead of NON_LVALUE_EXPR
+ so convert_for_assignment won't strip it.
+ This is so this 0 won't be treated as a null pointer constant. */
result = build1 (NOP_EXPR, TREE_TYPE (x), x);
TREE_CONSTANT (result) = TREE_CONSTANT (x);
return result;