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-12 08:23:24 +0100
commit1d1360496f1fdebb1370ae491c988d2245a56da9 (patch)
tree0b6a71b98acd4a6f764086313949751a9200759e /compiler
parentcf5812aa9f9089f40275ae4d162f8a715635aad8 (diff)
downloadNim-1d1360496f1fdebb1370ae491c988d2245a56da9.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