aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-08-20 19:35:52 +0000
committerRichard Stallman <rms@gnu.org>1992-08-20 19:35:52 +0000
commita23b64d54870b13c4399d92f86d49ecef829b968 (patch)
tree6b3f3150fb9970c8dc8304c78b9a59892b0d2857 /gcc
parent106d7d7de857f613209718cae33a2da5a922bf59 (diff)
downloadgcc-a23b64d54870b13c4399d92f86d49ecef829b968.zip
gcc-a23b64d54870b13c4399d92f86d49ecef829b968.tar.gz
gcc-a23b64d54870b13c4399d92f86d49ecef829b968.tar.bz2
Compare enums (preds.
Compare enums (preds. codes, mem_mode) explicitly to 0 in conditionals to work-around a VAXC bug that disallows enum as arguments to && and || operators. From-SVN: r1916
Diffstat (limited to 'gcc')
-rw-r--r--gcc/genrecog.c8
-rw-r--r--gcc/reload1.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index f8b2169..bb12d06 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -588,7 +588,7 @@ not_both_true (d1, d2, toplevel)
for D1's predicate. */
if (d2->code != UNKNOWN)
{
- for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i]; i++)
+ for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i] != 0; i++)
if (preds[d1->pred].codes[i] == d2->code)
break;
@@ -600,7 +600,7 @@ not_both_true (d1, d2, toplevel)
else if (d2->pred >= 0)
{
- for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i]; i++)
+ for (i = 0; i < NUM_RTX_CODE && preds[d1->pred].codes[i] != 0; i++)
{
for (j = 0; j < NUM_RTX_CODE; j++)
if (preds[d2->pred].codes[j] == 0
@@ -1117,7 +1117,7 @@ write_tree_1 (tree, prevpos, afterward, type)
if (p->pred >= 0)
{
- for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i]; i++)
+ for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i] != 0; i++)
if (codemap[(int) preds[p->pred].codes[i]])
break;
@@ -1140,7 +1140,7 @@ write_tree_1 (tree, prevpos, afterward, type)
if (code == MATCH_OPERAND)
{
- for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i]; i++)
+ for (i = 0; i < NUM_RTX_CODE && preds[p->pred].codes[i] != 0; i++)
{
printf ("%scase ", indents[indent - 2]);
print_code (preds[p->pred].codes[i]);
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 845883a..8eee024 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2496,7 +2496,7 @@ eliminate_regs (x, mem_mode, insn)
We special-case the commonest situation in
eliminate_regs_in_insn, so just replace a PLUS with a
PLUS here, unless inside a MEM. */
- if (mem_mode && GET_CODE (XEXP (x, 1)) == CONST_INT
+ if (mem_mode != 0 && GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) == - ep->previous_offset)
return ep->to_rtx;
else