mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 06:20:38 +00:00
don't track result initialization if it is marked noinit (#24499)
We don't track `noinit` for variables introduced in https://github.com/nim-lang/Nim/pull/10566. It should be applied to `result` if the function is marked `noinit`
This commit is contained in:
@@ -19,7 +19,6 @@ proc volatileLoad*[T](src: ptr T): T {.inline, noinit.} =
|
||||
when defined(js):
|
||||
result = src[]
|
||||
else:
|
||||
result = default(T)
|
||||
{.emit: [result, " = (*(", typeof(src[]), " volatile*)", src, ");"].}
|
||||
|
||||
proc volatileStore*[T](dest: ptr T, val: T) {.inline.} =
|
||||
|
||||
Reference in New Issue
Block a user