summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2011-02-11 18:13:11 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2011-02-11 18:13:11 +0000
commit4df47bca15b2d9f5eb3832b05121cdd984c76da1 (patch)
tree11b96690599d55f55bbd47567e194d7fc6f13d42 /gcc/gcc.c
parent1c31ca71a7923d16e6ccba733edf14db0b399be9 (diff)
downloadgcc-4df47bca15b2d9f5eb3832b05121cdd984c76da1.tar.gz
re PR driver/47678 (missing error message for -I)
PR driver/47678 * gcc.c (main): Do not compile inputs if there were errors in option handling. * opts-common.c (read_cmdline_option): Check for wrong language after other error checks. testsuite: * gcc.dg/opts-6.c: New test. From-SVN: r170056
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 1736b091fb1..ec35ed01f6d 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -6597,6 +6597,9 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
if (n_infiles == added_libraries)
fatal_error ("no input files");
+ if (seen_error ())
+ goto out;
+
/* Make a place to record the compiler output file names
that correspond to the input files. */
@@ -6864,6 +6867,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
printf ("%s\n", bug_report_url);
}
+ out:
return (signal_count != 0 ? 2
: seen_error () ? (pass_exit_codes ? greatest_status : 1)
: 0);