summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-11 18:13:11 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2011-02-11 18:13:11 +0000
commit5585cfe812b2c31639f3739d934bc94233cf2e04 (patch)
tree11b96690599d55f55bbd47567e194d7fc6f13d42 /gcc/gcc.c
parentbb308a953b3973f0d0dbfa17cf03b4a4484ad852 (diff)
downloadgcc-5585cfe812b2c31639f3739d934bc94233cf2e04.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170056 138bc75d-0d04-0410-961f-82ee72b054a4
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);