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.
This commit is contained in:
LemonBoy 2019-02-12 08:23:24 +01:00 • committed by Andreas Rumpf
commit 1d1360496f

View file

@ -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