summary refs log tree commit diff stats
path: root/compiler/msgs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-06-11 00:31:40 +0200
committerAraq <rumpf_a@web.de>2013-06-11 00:31:40 +0200
commitc156f2d4938d6e79844a17ecad8c5c50b9c32354 (patch)
tree762a5987d6bd17b80f6ceaf371abf9273ca8b05b /compiler/msgs.nim
parent8f97f3180abf23d500027accffe6a1895d1a96ac (diff)
downloadNim-c156f2d4938d6e79844a17ecad8c5c50b9c32354.tar.gz
next steps for guarded data flow analysis
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r--compiler/msgs.nim23
1 files changed, 14 insertions, 9 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 302a7cfd8..e57c41f71 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -106,11 +106,13 @@ type
     warnUnknownSubstitutionX, warnLanguageXNotSupported, warnCommentXIgnored, 
     warnNilStatement, warnAnalysisLoophole,
     warnDifferentHeaps, warnWriteToForeignHeap, warnImplicitClosure,
-    warnEachIdentIsTuple, warnShadowIdent, warnProveInit, warnUninit, warnUser,
-    hintSuccess, hintSuccessX, 
-    hintLineTooLong, hintXDeclaredButNotUsed, hintConvToBaseNotNeeded, 
-    hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled, 
-    hintProcessing, hintCodeBegin, hintCodeEnd, hintConf, hintPath, 
+    warnEachIdentIsTuple, warnShadowIdent, 
+    warnProveInit, warnProveField, warnProveIndex,
+    warnUninit, warnUser,
+    hintSuccess, hintSuccessX,
+    hintLineTooLong, hintXDeclaredButNotUsed, hintConvToBaseNotNeeded,
+    hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled,
+    hintProcessing, hintCodeBegin, hintCodeEnd, hintConf, hintPath,
     hintConditionAlwaysTrue, hintPattern,
     hintUser
 
@@ -356,6 +358,8 @@ const
     warnEachIdentIsTuple: "each identifier is a tuple [EachIdentIsTuple]",
     warnShadowIdent: "shadowed identifier: '$1' [ShadowIdent]",
     warnProveInit: "Cannot prove that '$1' is initialized. This will become a compile time error in the future. [ProveInit]",
+    warnProveField: "cannot prove that field '$1' is accessible [ProveField]",
+    warnProveIndex: "cannot prove index '$1' is valid [ProveIndex]",
     warnUninit: "'$1' might not have been initialized [Uninit]",
     warnUser: "$1 [User]", 
     hintSuccess: "operation successful [Success]", 
@@ -376,15 +380,15 @@ const
     hintUser: "$1 [User]"]
 
 const
-  WarningsToStr*: array[0..21, string] = ["CannotOpenFile", "OctalEscape", 
+  WarningsToStr*: array[0..23, string] = ["CannotOpenFile", "OctalEscape", 
     "XIsNeverRead", "XmightNotBeenInit",
     "Deprecated", "ConfigDeprecated",
     "SmallLshouldNotBeUsed", "UnknownMagic", 
     "RedefinitionOfLabel", "UnknownSubstitutionX", "LanguageXNotSupported", 
     "CommentXIgnored", "NilStmt",
     "AnalysisLoophole", "DifferentHeaps", "WriteToForeignHeap",
-    "ImplicitClosure", "EachIdentIsTuple", "ShadowIdent", "ProveInit", "Uninit",
-    "User"]
+    "ImplicitClosure", "EachIdentIsTuple", "ShadowIdent", 
+    "ProveInit", "ProveField", "ProveIndex", "Uninit", "User"]
 
   HintsToStr*: array[0..15, string] = ["Success", "SuccessX", "LineTooLong", 
     "XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded", 
@@ -516,7 +520,8 @@ proc sourceLine*(i: TLineInfo): PRope
 
 var
   gNotes*: TNoteKinds = {low(TNoteKind)..high(TNoteKind)} - 
-                        {warnShadowIdent, warnUninit}
+                        {warnShadowIdent, warnUninit,
+                         warnProveField, warnProveIndex}
   gErrorCounter*: int = 0     # counts the number of errors
   gHintCounter*: int = 0
   gWarnCounter*: int = 0