mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user