]> andersk Git - splint.git/blobdiff - src/nameChecks.c
Fixed -help <mode> bug.
[splint.git] / src / nameChecks.c
index d17a941f983710151f0f6cbc5ffa0b79814ccf5a..5566114803eb3ba85eeaceb0f791d6d06b157585 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 University of Virginia,
 **         Massachusetts Institute of Technology
 **
 ** This program is free software; you can redistribute it and/or modify it
@@ -1124,7 +1124,7 @@ checkFileScopeName (/*@unused@*/ uentry ue)
   ** No file scope checks (yet)
   */
 
-  /*@i423 add a file scope naming convention policy? */
+  /* add a file scope naming convention policy? */
 
   return;
 }
@@ -1336,7 +1336,20 @@ checkAnsiName (uentry ue)
         uentry_whereLast (ue));
     }
 
-  DPRINTF (("Here..."));
+  /*
+  ** evans - 2002-12-16: added this check (even though it is not required by ISO)
+  */
+
+  if (fchar == 'S' && schar == 'A' && tchar == '_')
+    {
+      hasError |= optgenerror2
+       (FLG_ISORESERVED, FLG_NAMECHECKS,
+        message 
+        ("Name %s may be defined as a macro by Linux library. "
+         "It is not research by the ISO specification, but may produce conflicts on some systems.",
+         name),
+        uentry_whereLast (ue));
+    }
 
   if ((uentry_isVisibleExternally (ue) && !uentry_isAnyTag (ue))
       || context_getFlag (FLG_ISORESERVEDLOCAL))
@@ -1474,7 +1487,7 @@ checkAnsiName (uentry ue)
             message
             ("Name %s is reserved for future library extensions.  "
              "Functions that begin with \"mem\" or \"wcs\" and a "
-             "lowercase letter letter may be added to <string.h>. (ISO:7.26.11)",
+             "lowercase letter may be added to <string.h>. (ISO:7.26.11)",
              name),
             uentry_whereLast (ue));
        }
@@ -1542,4 +1555,4 @@ void checkParamNames (uentry ue)
     }
 }
 
-/*@i523 POSIX p. 527 - applications should not declare any symbols that end _MAX @*/
+/* not yet checked: POSIX p. 527 - applications should not declare any symbols that end _MAX */
This page took 0.230441 seconds and 4 git commands to generate.