aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts-common.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/opts-common.c
parent1c31ca71a7923d16e6ccba733edf14db0b399be9 (diff)
downloadgcc-4df47bca15b2d9f5eb3832b05121cdd984c76da1.zip
gcc-4df47bca15b2d9f5eb3832b05121cdd984c76da1.tar.gz
gcc-4df47bca15b2d9f5eb3832b05121cdd984c76da1.tar.bz2
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/opts-common.c')
-rw-r--r--gcc/opts-common.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index e6cb552..3c4044a 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -960,12 +960,6 @@ read_cmdline_option (struct gcc_options *opts,
return;
}
- if (decoded->errors & CL_ERR_WRONG_LANG)
- {
- handlers->wrong_lang_callback (decoded, lang_mask);
- return;
- }
-
if (decoded->errors & CL_ERR_MISSING_ARG)
{
if (option->missing_argument_error)
@@ -1012,6 +1006,12 @@ read_cmdline_option (struct gcc_options *opts,
return;
}
+ if (decoded->errors & CL_ERR_WRONG_LANG)
+ {
+ handlers->wrong_lang_callback (decoded, lang_mask);
+ return;
+ }
+
gcc_assert (!decoded->errors);
if (!handle_option (opts, opts_set, decoded, lang_mask, DK_UNSPECIFIED,