summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2019-02-12 08:23:24 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-02-13 23:30:14 +0100
commit76df77f912759daf633e9cb113d996bdeb22ea72 (patch)
tree9c669f2c6637e9c1cced09d5829abaa117828eb7 /compiler
parentd64e218abdadb3036e32ff62bc0c38b0118121f5 (diff)
downloadNim-76df77f912759daf633e9cb113d996bdeb22ea72.tar.gz
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.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semfold.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semfold.nim b/compiler/semfold.nim
index f0b03018f..246871928 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