From 5585cfe812b2c31639f3739d934bc94233cf2e04 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Fri, 11 Feb 2011 18:13:11 +0000 Subject: 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 --- gcc/gcc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/gcc.c') 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); -- cgit v1.2.1