/*
** 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
# include "structNames.h"
# include "nameChecks.h"
+# include "cscannerHelp.h"
+
# ifdef SANITIZER
# include "sgrammar_tokens.h"
# else
voptgenerror
(FLG_COMMENTERROR,
message ("Global variable %s used state clause. (Global variables "
- "are not recognized in state clauses. If there is "
+ "are not recognized in state clauses. If they are present "
+ "they are ignored. "
+ " If there is "
"sufficient interest in support for this, it may be "
"added to a future release. Send mail to "
"info@splint.org.)",
{
llfatalerrorLoc (cstring_makeLiteral("Macro defined constants can not be used in function constraints unless they are specifed with the constant annotation. To use a macro defined constant include an annotation of the form /*@constant <type> <name>=<value>@*/ somewhere before the function constraint. This restriction may be removed in future releases if it is determined to be excessively burdensome." ));
}
- return sRef_saveCopy (sr); /*@i523 why the saveCopy? */
+
+ /*@ savedCopy to used to mitigate danger of accessing freed memory*/
+ return sRef_saveCopy (sr);
}
void checkModifiesId (uentry ue)
}
else
{
- /*@i222@*/
- /*drl handle structure invariant */
- /*@i222@*/
+ /* drl This is the code for structure invariants
+
+ It is no yet stable enough to be included in a Splint release.
+ */
+
/*check that we're in a structure */
-# if 0\r
+#if 0
/*@unused@*/ uentryList ueL;
/*@unused@*/ uentry ue2;
/*@unused@*/ ctype ct;\r
-# endif
+#endif
fileloc loc = fileloc_decColumn (g_currentloc, size_toInt (cstring_length (s)));
ret = sRef_undefined;
# if 0
- /*drl commenting this out for now
+
ct = context_getLastStruct ( ct );
llassert( ctype_isStruct(ct) );
return ret;
}
- */\r
-# endif\r
+
+#endif
voptgenerror
(FLG_UNRECOG,