summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-12-20 15:04:13 +0800
committerGitHub <noreply@github.com>2022-12-20 15:04:13 +0800
commit886572a5162beea672d696fb03422e7777f56cfb (patch)
treea79ef30baf002c2bf6f8309d22eb927422f0bb81
parente278a781fc5bfc115326ed6c1873268d51b25303 (diff)
downloadNim-886572a5162beea672d696fb03422e7777f56cfb.tar.gz
disable "Warning: gc is deprecated" in compiler (#21137)
* disable "Warning: gc is deprecated" in compiler

* Apply @tersec 's suggestion
-rw-r--r--compiler/vmops.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/vmops.nim b/compiler/vmops.nim
index edf457295..d4a91b22d 100644
--- a/compiler/vmops.nim
+++ b/compiler/vmops.nim
@@ -145,6 +145,7 @@ when defined(nimHasInvariant):
   from std / compilesettings import SingleValueSetting, MultipleValueSetting
 
   proc querySettingImpl(conf: ConfigRef, switch: BiggestInt): string =
+    {.push warning[Deprecated]:off.}
     case SingleValueSetting(switch)
     of arguments: result = conf.arguments
     of outFile: result = conf.outFile.string
@@ -162,6 +163,7 @@ when defined(nimHasInvariant):
     of libPath: result = conf.libpath.string
     of gc: result = $conf.selectedGC
     of mm: result = $conf.selectedGC
+    {.pop.}
 
   proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] =
     template copySeq(field: untyped): untyped =