summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cgen.c b/cgen.c
index 2fd5cbf..b27f2fa 100644
--- a/cgen.c
+++ b/cgen.c
@@ -121,7 +121,7 @@ static inline void cgen_char(CGenerator *g, char c) {
if (isprint(c) && c != '"')
cgen_write(g, "%c", c);
else
- cgen_write(g, "\\x%02x", c);
+ cgen_write(g, "\\%03o", c); /* can't use hex escape sequences, because they can be more than 2 characters "\xbafoo" is '\xbaf', 'o', 'o' */
}
/* should this declaration be a direct function declaration C? (as opposed to using a function pointer or not being a function) */
static bool cgen_fn_is_direct(CGenerator *g, Declaration *d) {
@@ -1250,6 +1250,9 @@ static void cgen_expr(CGenerator *g, Expression *e) {
case BUILTIN_PLATFORM:
cgen_write(g, "platform__");
break;
+ case BUILTIN_DEBUG: /* substituted for its value */
+ assert(0);
+ break;
}
break;
case EXPR_CAST: {