summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--lib/pure/includes/oserr.nim2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 0943d7836..681b4b0a4 100644
--- a/changelog.md
+++ b/changelog.md
@@ -50,6 +50,7 @@
 - For string inputs, ``strutils.isUpperAscii`` and ``strutils.isLowerAscii`` now
   require a second mandatory parameter ``skipNonAlpha``.
 
+- ``osLastError`` is now marked with ``sideEffect``
 - The procs ``parseHexInt`` and ``parseOctInt`` now fail on empty strings
     and strings containing only valid prefixes, e.g. "0x" for hex integers.
 
diff --git a/lib/pure/includes/oserr.nim b/lib/pure/includes/oserr.nim
index bfb6118f2..eb350cbd4 100644
--- a/lib/pure/includes/oserr.nim
+++ b/lib/pure/includes/oserr.nim
@@ -66,7 +66,7 @@ proc raiseOSError*(errorCode: OSErrorCode; additionalInfo = "") {.noinline.} =
   raise e
 
 {.push stackTrace:off.}
-proc osLastError*(): OSErrorCode =
+proc osLastError*(): OSErrorCode {.sideEffect.} =
   ## Retrieves the last operating system error code.
   ##
   ## This procedure is useful in the event when an OS call fails. In that case