public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85348f6
)
prevent a voluntary crash and generate better code
author
ceriel
<none@none>
Mon, 11 Jan 1988 14:06:20 +0000
(14:06 +0000)
committer
ceriel
<none@none>
Mon, 11 Jan 1988 14:06:20 +0000
(14:06 +0000)
lang/cem/cemcom/conversion.c
patch
|
blob
|
history
lang/cem/cemcom/declar.g
patch
|
blob
|
history
diff --git
a/lang/cem/cemcom/conversion.c
b/lang/cem/cemcom/conversion.c
index
7013771
..
614ebfe
100644
(file)
--- a/
lang/cem/cemcom/conversion.c
+++ b/
lang/cem/cemcom/conversion.c
@@
-109,13
+109,15
@@
conversion(from_type, to_type)
) {
extern long full_mask[];
- C_loc((arith) full_mask[(int)(to_type->tp_size)]);
- C_and(word_size);
if (to_fund == T_SIGNED) {
C_loc(to_type->tp_size);
C_loc(word_size);
C_cii();
}
+ else {
+ C_loc((arith) full_mask[(int)(to_type->tp_size)]);
+ C_and(word_size);
+ }
}
}
diff --git
a/lang/cem/cemcom/declar.g
b/lang/cem/cemcom/declar.g
index
e233200
..
2288d61
100644
(file)
--- a/
lang/cem/cemcom/declar.g
+++ b/
lang/cem/cemcom/declar.g
@@
-177,6
+177,7
@@
initializer(struct idf *idf; int sc;)
:
{ if (idf->id_def->df_type->tp_fund == FUNCTION) {
error("illegal initialization of function");
+ idf->id_def->df_type->tp_fund = ERRONEOUS;
}
}
[