]> andersk Git - splint.git/blobdiff - src/llmain.c
Fixed problem with assertion checking for negative shifts in
[splint.git] / src / llmain.c
index 5a389160ab56cebfec5716662427a61ccbfa95b8..40178a3f162f5569f82be1eff35680c7791fdc66 100644 (file)
@@ -52,7 +52,6 @@
 # include "basic.h"
 # include "osd.h"
 # include "help.h"
-
 # include "gram.h"
 # include "lclscan.h"
 # include "scanline.h"
@@ -71,9 +70,8 @@
 # include "Headers/version.h" /* Visual C++ finds the wrong version.h */
 # include "lcllib.h"
 # include "cgrammar.h"
+# include "rcfiles.h"
 # include "llmain.h"
-# include "portab.h"
-
 
 extern /*@external@*/ int yydebug;
 static void cleanupFiles (void);
@@ -824,8 +822,10 @@ int main (int argc, char *argv[])
   **  will be <tmpprefix>.<file>.c)
   */
 
+  /* Why was this here?  It is always a bug... */
+# if 0
   {
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
     int nfiles = /*@-unrecog@*/ _fcloseall (); /*@=unrecog@*/
 
     if (nfiles != 0) 
@@ -834,6 +834,7 @@ int main (int argc, char *argv[])
       }
 # endif
   }
+# endif
 
   DPRINTF (("Initializing..."));
 
@@ -1089,6 +1090,13 @@ int main (int argc, char *argv[])
        }
 
       cstring_free (specErrors);
+  
+      if (context_numBugs () > 0) {
+       expsuccess = FALSE;
+       if (!isQuiet) {
+         llmsg (message ("   %d internal bugs reported", context_numBugs ()));
+       }
+      }
   }
   
   if (context_getFlag (FLG_STATS))
@@ -1096,7 +1104,7 @@ int main (int argc, char *argv[])
       clock_t ttime = clock () - before;
       int specLines = context_getSpecLinesProcessed ();
       cstring specmsg = cstring_undefined;
-
+      
       rstime = clock ();
       
       if (specLines > 0)
@@ -1213,7 +1221,7 @@ llinterrupt (int i)
                 cstring_toCharsSafe (loc));
        cstring_free (loc);
        printCodePoint ();
-       fprintf (g_errorstream, "*** Please report bug to %s\n", SPLINT_MAINTAINER);
+       fprintf (g_errorstream, "*** Please report bug to %s\n*** A useful bug report should include everything we need to reproduce the bug.\n", SPLINT_MAINTAINER);
        exit (LLGIVEUP);
       }
     default:
@@ -1223,7 +1231,7 @@ llinterrupt (int i)
               cstring_toCharsSafe (fileloc_unparse (g_currentloc)));
       /*@=mustfree@*/
       printCodePoint ();
-      fprintf (g_errorstream, "*** Please report bug to %s ***\n", SPLINT_MAINTAINER);
+      fprintf (g_errorstream, "*** Please report bug to %s\n*** A useful bug report should include everything we need to reproduce the bug.", SPLINT_MAINTAINER);
       exit (LLGIVEUP);
     }
 }
@@ -1253,7 +1261,7 @@ cleanupFiles (void)
     }
   else
     {
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
       int nfiles = /*@-unrecog@*/ _fcloseall (); /*@=unrecog@*/
       
       if (nfiles != 0) 
@@ -1276,7 +1284,7 @@ llexit (int status)
 {
   DPRINTF (("llexit: %d", status));
 
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
   if (status == LLFAILURE) 
     {
       _fcloseall ();
@@ -1288,7 +1296,13 @@ llexit (int status)
   if (status != LLFAILURE)
     {
       usymtab_destroyMod ();
-      context_destroyMod ();
+
+      /*drl I'm commenting this line out
+               because it is causing Splint to crash when built with
+                       2.95 I'm not sure if this is a compiler bug or if if has to do with bool
+                               Any way if we're going to exist the program why do we bother freeing stuff...
+      */
+      /*      context_destroyMod (); */
       exprNode_destroyMod ();
       cppReader_destroyMod ();
       sRef_destroyMod ();
This page took 0.035159 seconds and 4 git commands to generate.