summaryrefslogtreecommitdiff
path: root/bcc/express.c
diff options
context:
space:
mode:
Diffstat (limited to 'bcc/express.c')
-rw-r--r--bcc/express.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bcc/express.c b/bcc/express.c
index f57db0a..bceff0e 100644
--- a/bcc/express.c
+++ b/bcc/express.c
@@ -43,7 +43,12 @@ PRIVATE struct nodestruct *cast_exp()
if (vartype->scalar & INT && scalar & (CHAR | SHORT | INT)
&& !((vartype->scalar ^ scalar) & UNSIGNED))
{
- nodeptr->flags &= ~LVALUE;
+/* No ancient switch on low mem systems */
+#ifndef VERY_SMALL_MEMORY
+ /* In ancient UNIX C, casts remain lvalues */
+ if (!ancient)
+#endif
+ nodeptr->flags &= ~LVALUE;
return nodeptr; /* skip casts that are default promotions */
}
return castnode(vartype, nodeptr);