From 76df77f912759daf633e9cb113d996bdeb22ea72 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 12 Feb 2019 08:23:24 +0100 Subject: [PATCH] Fix codegen problem with strict C++ compilers (#10639) Since tyCString is convertible to a tyPointer we must be extra careful to emit a cast to (void*) in order to appease clang++. Reported by masnagam on the Nim forum. --- compiler/semfold.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/semfold.nim b/compiler/semfold.nim index f0b03018fb..2468719286 100644 --- a/compiler/semfold.nim +++ b/compiler/semfold.nim @@ -465,7 +465,7 @@ proc foldConv(n, a: PNode; g: ModuleGraph; check = false): PNode = else: result = a result.typ = n.typ - of tyOpenArray, tyVarargs, tyProc: + of tyOpenArray, tyVarargs, tyProc, tyPointer: discard else: result = a