From e78bd69619289eb8a981a0d33f17a1ca0e233bee Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 27 Feb 2017 16:16:14 +0100 Subject: [PATCH] C codegen: escape '?' because C has trigraphs --- compiler/msgs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 0d30651bb4..acf171cbe8 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -532,7 +532,7 @@ var proc toCChar*(c: char): string = case c of '\0'..'\x1F', '\x80'..'\xFF': result = '\\' & toOctal(c) - of '\'', '\"', '\\': result = '\\' & c + of '\'', '\"', '\\', '?': result = '\\' & c else: result = $(c) proc makeCString*(s: string): Rope =