diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-07-04 19:35:30 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-07-04 19:35:30 +0000 |
commit | bbed13b1d5402f63310c25f5eff835cd80cb70fa (patch) | |
tree | cbdbe59158892a2b5c179939a44ea5055d8fbd84 /gcc/gcc.c | |
parent | 72ea889aa5741088c055de3cf428c6d2ad895b29 (diff) | |
download | gcc-bbed13b1d5402f63310c25f5eff835cd80cb70fa.zip gcc-bbed13b1d5402f63310c25f5eff835cd80cb70fa.tar.gz gcc-bbed13b1d5402f63310c25f5eff835cd80cb70fa.tar.bz2 |
* gcc.c (process_command): Don't assign elements of a const char*.
From-SVN: r43767
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -3387,9 +3387,11 @@ process_command (argc, argv) if (! IS_DIR_SEPARATOR (value [len - 1]) && is_directory (value, "", 0)) { - value = strcpy (xmalloc (len + 2), value); - value[len] = DIR_SEPARATOR; - value[++ len] = 0; + char *tmp = xmalloc (len + 2); + strcpy (tmp, value); + tmp[len] = DIR_SEPARATOR; + tmp[++ len] = 0; + value = tmp; } /* As a kludge, if the arg is "[foo/]stageN/", just |