]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCCmain.c (parseCmdLine): only set options.xstack_loc for mcs51,
authorMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 3 Mar 2007 17:26:55 +0000 (17:26 +0000)
committerMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 3 Mar 2007 17:26:55 +0000 (17:26 +0000)
  added condition to macro, fixes bug 1666080

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4662 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCmain.c

index 0f94c25095eaadc2362cab5be98870dfe67a7486..3c2d18d9ddd084f00941452da1c294707422ee70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-03 Maarten Brock <sourceforge.brock AT dse.nl>
+
+       * src/SDCCmain.c (parseCmdLine): only set options.xstack_loc for mcs51,
+         added condition to macro, fixes bug 1666080
+
 2007-03-02 Raphael Neider <rneider AT web.de>
 
        * src/pic/gen.c (genGenPointerSet): removed bogus assertion
@@ -12,8 +17,8 @@
 
        * src/SDCCglobl.h,
        * src/SDCCmain.c,
-       * src/mcs51/gen.c, 
-       * src/mcs51/rtrack.c, 
+       * src/mcs51/gen.c,
+       * src/mcs51/rtrack.c,
        * src/ds390/gen.c,
        * doc/sdccman.lyx: added --no-gen-comments
        * src/mcs51/peeph.def: added 192.b, disabled 185
index d720ad8785a9f007972db9132ca63aa9c04a79f4..62d11db7e94d450daaf18f63b635e5e2a2a77077 100644 (file)
@@ -1454,11 +1454,11 @@ parseCmdLine (int argc, char **argv)
   if (TARGET_IS_MCS51)
     {
       options.float_rent++;
-    }
 
-  /* set up external stack location if not explicitly specified */
-  if (!options.xstack_loc)
-    options.xstack_loc = options.xdata_loc;
+      /* set up external stack location if not explicitly specified */
+      if (!options.xstack_loc)
+        options.xstack_loc = options.xdata_loc;
+    }
 
   /* if debug option is set then open the cdbFile */
   if (options.debug && fullSrcFileName)
@@ -1552,10 +1552,13 @@ linkEdit (char **envp)
         }
 
 #define WRITE_SEG_LOC(N, L) \
-  segName = Safe_strdup(N); \
-  c = strtok(segName, " \t"); \
-  fprintf (lnkfile,"-b %s = 0x%04x\n", c, L); \
-  if (segName) { Safe_free(segName); }
+  if (N) \
+  { \
+    segName = Safe_strdup(N); \
+    c = strtok(segName, " \t"); \
+    fprintf (lnkfile,"-b %s = 0x%04x\n", c, L); \
+    if (segName) { Safe_free(segName); } \
+  }
 
       if (!(TARGET_Z80_LIKE)) /*Not for the z80, gbz80*/
         {