diff options
author | Joseph Myers <joseph@codesourcery.com> | 2011-02-11 18:13:11 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2011-02-11 18:13:11 +0000 |
commit | 4df47bca15b2d9f5eb3832b05121cdd984c76da1 (patch) | |
tree | 11b96690599d55f55bbd47567e194d7fc6f13d42 /gcc/opts-common.c | |
parent | 1c31ca71a7923d16e6ccba733edf14db0b399be9 (diff) | |
download | gcc-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.c | 12 |
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, |