"Fix" of compiler crash
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 25 Sep 2001 19:50:33 +0000 (19:50 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 25 Sep 2001 19:50:33 +0000 (19:50 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1312 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCmain.c

index 3573c6bb7aafb34d3ee83421bb5f0dd6311bb7cb..4016c5c5e272c2b05a6d591dd6ad8b64b51ddce5 100644 (file)
@@ -502,7 +502,7 @@ processFile (char *s)
        {
          werror (E_FILE_OPEN_ERR, s);
          exit (1);
-       }
+       }
 
       /* copy the file name into the buffer */
       strcpy (buffer, s);
@@ -1266,10 +1266,14 @@ preProcess (char **envp)
       setMainValue ("cppextraopts", join(preArgv));
       
       if (!preProcOnly)
-       preOutName = strdup (tmpnam (NULL));
-
-      setMainValue ("cppoutfilename", preOutName);
+      {
+        preOutName = strdup (tmpnam (NULL));
 
+        setMainValue ("cppoutfilename", preOutName);
+      }
+      else
+        setMainValue ("cppoutfilename", "notexistent_fixme");  // Fix me!
+       
       if (options.verbose)
        printf ("sdcc: Calling preprocessor...\n");