summary refs log tree commit diff stats
path: root/compiler/msgs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-09-21 18:39:00 +0200
committerAraq <rumpf_a@web.de>2014-09-21 18:39:00 +0200
commit7916b1f9aa93fca368afda8b18396230ac7f338c (patch)
tree04072aeee4ae211b91c088a7267455b82daf9787 /compiler/msgs.nim
parent4800acf6ab92799316b270c991b6e8c01454608f (diff)
downloadNim-7916b1f9aa93fca368afda8b18396230ac7f338c.tar.gz
implemented 'guard' annotation
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r--compiler/msgs.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index da2fe122d..8368fe5fd 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -119,7 +119,7 @@ type
     warnDifferentHeaps, warnWriteToForeignHeap, warnUnsafeCode,
     warnEachIdentIsTuple, warnShadowIdent, 
     warnProveInit, warnProveField, warnProveIndex, warnGcUnsafe, warnGcUnsafe2,
-    warnUninit, warnGcMem, warnUser,
+    warnUninit, warnGcMem, warnUnguardedAccess, warnUser,
     hintSuccess, hintSuccessX,
     hintLineTooLong, hintXDeclaredButNotUsed, hintConvToBaseNotNeeded,
     hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled,
@@ -387,9 +387,10 @@ const
     warnProveField: "cannot prove that field '$1' is accessible [ProveField]",
     warnProveIndex: "cannot prove index '$1' is valid [ProveIndex]",
     warnGcUnsafe: "not GC-safe: '$1' [GcUnsafe]",
-    warnGcUnsafe2: "cannot prove '$1' is GC-safe. This will become a compile time error in the future.",
+    warnGcUnsafe2: "cannot prove '$1' is GC-safe. Does not compile with --threads:on.",
     warnUninit: "'$1' might not have been initialized [Uninit]",
     warnGcMem: "'$1' uses GC'ed memory [GcMem]",
+    warnUnguardedAccess: "'$1' is accessed without its guard [UnguardedAccess]",
     warnUser: "$1 [User]", 
     hintSuccess: "operation successful [Success]", 
     hintSuccessX: "operation successful ($# lines compiled; $# sec total; $#) [SuccessX]", 
@@ -410,7 +411,7 @@ const
     hintUser: "$1 [User]"]
 
 const
-  WarningsToStr*: array[0..26, string] = ["CannotOpenFile", "OctalEscape", 
+  WarningsToStr*: array[0..27, string] = ["CannotOpenFile", "OctalEscape", 
     "XIsNeverRead", "XmightNotBeenInit",
     "Deprecated", "ConfigDeprecated",
     "SmallLshouldNotBeUsed", "UnknownMagic", 
@@ -419,7 +420,7 @@ const
     "AnalysisLoophole", "DifferentHeaps", "WriteToForeignHeap",
     "UnsafeCode", "EachIdentIsTuple", "ShadowIdent", 
     "ProveInit", "ProveField", "ProveIndex", "GcUnsafe", "GcUnsafe2", "Uninit",
-    "GcMem", "User"]
+    "GcMem", "UnguardedAccess", "User"]
 
   HintsToStr*: array[0..16, string] = ["Success", "SuccessX", "LineTooLong", 
     "XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded",