diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-05-02 13:53:21 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-05-02 13:53:21 -0700 |
commit | e184d694d8f474bff290192538d1d6604833644d (patch) | |
tree | d153ca69ea896a83acaa401a0a84e1b5bde3e3b9 | |
parent | e32fe22499cfa3b6713e89130074167f56070b3f (diff) | |
download | gcc-e184d694d8f474bff290192538d1d6604833644d.zip gcc-e184d694d8f474bff290192538d1d6604833644d.tar.gz gcc-e184d694d8f474bff290192538d1d6604833644d.tar.bz2 |
(translate_options): For options that take an argument,
don't skip the argument if it doesn't exist.
From-SVN: r7190
-rw-r--r-- | gcc/gcc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -900,6 +900,12 @@ translate_options (argcp, argvp) else if (! strcmp (p, "Xlinker")) nskip += 1; + /* Watch out for an option at the end of the command line that + is missing arguments, and avoid skipping past the end of the + command line. */ + if (nskip + i > argc) + nskip = argc - i; + while (nskip > 0) { newv[newindex++] = argv[i++]; |