]> andersk Git - splint.git/blobdiff - src/context.c
Added support for +longint and +shortint and associated test case.
[splint.git] / src / context.c
index 6d521cb73629c2c17a2f1e9abd36d75525090757..0b455382a298bd897bf724000bb971cb57fd3922 100644 (file)
@@ -1109,7 +1109,7 @@ context_setModeAux (cstring s, bool warn)
     {
       flagcode modeflags[] = 
        { 
-         FLG_BOOLINT, FLG_CHARINT, FLG_FLOATDOUBLE,
+         FLG_BOOLINT, FLG_CHARINT, FLG_FLOATDOUBLE, FLG_LONGINT, FLG_SHORTINT,
          FLG_ENUMINT, FLG_RELAXQUALS, FLG_FORWARDDECL, 
          FLG_CHARINDEX, FLG_ABSTVOIDP, FLG_USEALLGLOBS, 
          FLG_CHARUNSIGNEDCHAR,
@@ -1875,12 +1875,9 @@ context_enterFunction (/*@exposed@*/ uentry e)
   sRef_enterFunctionScope ();
 }
 
-bool context_inOldSytleScope(void)
+bool context_inOldStyleScope(void)
 {
-  if (gc.kind == CX_OLDSTYLESCOPE)
-    return TRUE;
-  else
-    return FALSE;
+  return (gc.kind == CX_OLDSTYLESCOPE);
 }
 
 void
@@ -4371,32 +4368,42 @@ context_destroyMod (void)
 }
 
 /*
-** Flag shortcuts.
+** Flag shortcuts
 */
 
 bool context_msgBoolInt (void)
 {
-  return gc.flags [FLG_BOOLINT];
+  return context_flagOn (FLG_BOOLINT, g_currentloc);
 }
 
 bool context_msgCharInt (void)
 {
-  return gc.flags [FLG_CHARINT];
+  return context_flagOn (FLG_CHARINT, g_currentloc);
 }
 
 bool context_msgEnumInt (void)
 {
-  return gc.flags [FLG_ENUMINT];
+  return context_flagOn (FLG_ENUMINT, g_currentloc);
+}
+
+bool context_msgLongInt (void)
+{
+  return context_flagOn (FLG_LONGINT, g_currentloc);
+}
+
+bool context_msgShortInt (void)
+{
+  return context_flagOn (FLG_SHORTINT, g_currentloc);
 }
 
 bool context_msgPointerArith (void) 
 {
-  return gc.flags [FLG_POINTERARITH];
+  return context_flagOn (FLG_POINTERARITH, g_currentloc);
 }
 
 bool context_msgStrictOps (void) 
 {
-  return gc.flags [FLG_STRICTOPS];
+  return context_flagOn (FLG_STRICTOPS, g_currentloc);
 }
 
 bool context_msgLh (void)           
@@ -4888,6 +4895,9 @@ ctype context_getLastStruct (/*@returned@*/ /*ctype s*/) /*@globals lastStruct@*
   return lastStruct;
 }
 
+/*
+** Why is this stuff in context.c?
+*/
 
 /*@unused@*/ static int sInfoNum = 0;
 
@@ -4904,9 +4914,7 @@ struct sInfo {
  /*@unused@*/ struct getUe * t ;
 };
 
-
-static struct sInfo globalStructInfo;
-
+/* unused: static struct sInfo globalStructInfo; */
 
 /*drl 1/6/2001: I didn't think these functions were solid enough to include in the
   stable  release of splint.  I coomented them out so that they won't break anything
@@ -4917,8 +4925,9 @@ static struct sInfo globalStructInfo;
 
 /*@-paramuse@*/
 
-void  setGlobalStructInfo(ctype ct, constraintList list)
+void context_setGlobalStructInfo(ctype ct, constraintList list)
 {
+# if 0
   /* int i;
   uentryList f;
 
@@ -4951,8 +4960,10 @@ void  setGlobalStructInfo(ctype ct, constraintList list)
       end_uentryList_elements;
     }
   */
+# endif
 }
 
+# if 0
 /*
 
 bool hasInvariants (ctype ct) /*@* /
@@ -4966,8 +4977,11 @@ bool hasInvariants (ctype ct) /*@* /
     return FALSE;
   
 }
-
-
 */
+# endif
 
 /*@=paramuse@*/
+
+
+
+
This page took 0.050573 seconds and 4 git commands to generate.