Bug 47678 - [4.6 regression] missing error message for -I
Summary: [4.6 regression] missing error message for -I
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Joseph S. Myers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 13:33 UTC by Eric Botcazou
Modified: 2011-02-11 18:15 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.6.0
Known to fail:
Last reconfirmed: 2011-02-10 18:43:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Botcazou 2011-02-10 13:33:07 UTC
The error message for a missing argument to -I has disappeared.  It used to be:

gcc: argument to '-I' is missing

Now a cryptic message is issued:

cc1: fatal error: /home/eric/build/gcc/native32/gcc/../lib/gcc/i586-suse-linux/4.6.0/: No such file or directory
compilation terminated.

As a matter of fact, the Ada compiler is also affected.
Comment 1 Eric Botcazou 2011-02-10 18:28:42 UTC
> Now a cryptic message is issued:
> 
> cc1: fatal error:
> /home/eric/build/gcc/native32/gcc/../lib/gcc/i586-suse-linux/4.6.0/: No such
> file or directory
> compilation terminated.

This was for an uninstalled compiler.  For an installed one:

cc1: warning: t.c: not a directory [enabled by default]

and the compiler waits indefinitely.
Comment 2 Joseph S. Myers 2011-02-10 18:43:22 UTC
Testing a patch.
Comment 3 Joseph S. Myers 2011-02-11 18:13:15 UTC
Author: jsm28
Date: Fri Feb 11 18:13:11 2011
New Revision: 170056

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170056
Log:
	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.

Added:
    trunk/gcc/testsuite/gcc.dg/opts-6.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gcc.c
    trunk/gcc/opts-common.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Joseph S. Myers 2011-02-11 18:15:36 UTC
Fixed for 4.6.0.