Bug 15690 - [4.0 Regression] compilation stops after the first file with errors
Summary: [4.0 Regression] compilation stops after the first file with errors
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: patch
: 18732 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-27 18:12 UTC by Dan Nicolaescu
Modified: 2004-12-11 07:45 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-11-08 13:57:23


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Nicolaescu 2004-05-27 18:12:10 UTC
Here is how to reproduce this:

echo junk > junk.c
echo junk > junk1.c
echo junk > junk2.c

mainline gcc would do:
gcc -c *.c
junk.c:1: error: parse error at end of input

i.e. it does not try to compile the files on the command line after encountering 
the first error. 

gcc-3.4.0 would print

gcc -c *.c
junk.c:1: error: parse error at end of input
junk1.c:1: error: parse error at end of input
junk2.c:1: error: parse error at end of input
Comment 1 Andrew Pinski 2004-05-27 18:16:29 UTC
I actually like this new way because it gave you time to fix the first errors without having to do a 
control-C to stop the compiling the rest of the files.
Comment 2 Dan Nicolaescu 2004-05-27 19:18:04 UTC
(In reply to comment #1)
> I actually like this new way because it gave you time to fix the first errors
without having to do a 
> control-C to stop the compiling the rest of the files.

Well, that is incosistent with what other compilers do, 
and with what is done for an error in one file. 

Was this a documented change? 
Comment 3 Andrew Pinski 2004-05-27 19:25:52 UTC
No but the old way was not documented either as far as I can see. Also most of the time you are not 
passing more than one file to the driver.
Comment 4 Dan Nicolaescu 2004-05-27 20:24:45 UTC
(In reply to comment #3)
> Also most of the time you are not 
> passing more than one file to the driver.

In that case the old and new behavior are completely identical. 

In the case you are passing multiple files (and a lot of people do) then you'd
want to see all the errors from all files  for the same reasons you want to see
all the errors within a file. 
Comment 5 Andrew Pinski 2004-06-25 23:24:53 UTC
Confirmed.
Comment 6 Andrew Pinski 2004-11-30 02:05:59 UTC
*** Bug 18732 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Pinski 2004-11-30 02:07:22 UTC
This was caused by the combination of the following patches:
2004-04-07  Caroline Tice  <ctice@apple.com>

        * gcc.c (main): Move 'break' in main loops (on an error)
        to wait until error processing has occurred.

2004-04-05  Caroline Tice  <ctice@apple.com>

        * gcc.c (combine_flag): New global variable, for new driver option.
        (struct compiler): Add two new fields, to be used when
        combining multiple input files in a single pass (IMA).
        (default_compilers):  Add values for the new fields to all
        compiler entries. Modify the "@c" compiler entry for doing IMA
        properly with "-save-temps" and the "combine" flag.
Comment 8 Devang Patel 2004-11-30 22:12:40 UTC
Subject: Re:  [4.0 Regression] compilation stops after the first file with errors

I am testing patch to fix this.

Comment 9 Andrew Pinski 2004-12-01 16:21:38 UTC
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2004-12/msg00030.html>.
Comment 10 Andrew Pinski 2004-12-11 07:45:10 UTC
Fixed by:
        PR 18732
        * gcc.c (main): Do not break out of loop when error is reported while
        processing one source file.