Commit 7e8400e2 by Martin Liska Committed by Martin Liska

Do not error when -E provided (PR pch/78970).

2017-01-09  Martin Liska  <mliska@suse.cz>

	PR pch/78970
	* gcc.c (driver_handle_option): Handle OPT_E and set
	have_E.
	(lookup_compiler): Do not show error message with have_E.

From-SVN: r244227
parent dc8bc65b
2017-01-09 Martin Liska <mliska@suse.cz>
PR pch/78970
* gcc.c (driver_handle_option): Handle OPT_E and set
have_E.
(lookup_compiler): Do not show error message with have_E.
2017-01-09 Jakub Jelinek <jakub@redhat.com> 2017-01-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/78938 PR tree-optimization/78938
......
...@@ -1931,6 +1931,9 @@ static int have_c = 0; ...@@ -1931,6 +1931,9 @@ static int have_c = 0;
/* Was the option -o passed. */ /* Was the option -o passed. */
static int have_o = 0; static int have_o = 0;
/* Was the option -E passed. */
static int have_E = 0;
/* Pointer to output file name passed in with -o. */ /* Pointer to output file name passed in with -o. */
static const char *output_file = 0; static const char *output_file = 0;
...@@ -4067,6 +4070,10 @@ driver_handle_option (struct gcc_options *opts, ...@@ -4067,6 +4070,10 @@ driver_handle_option (struct gcc_options *opts,
validated = true; validated = true;
break; break;
case OPT_E:
have_E = true;
break;
case OPT_x: case OPT_x:
spec_lang = arg; spec_lang = arg;
if (!strcmp (spec_lang, "none")) if (!strcmp (spec_lang, "none"))
...@@ -8328,7 +8335,8 @@ lookup_compiler (const char *name, size_t length, const char *language) ...@@ -8328,7 +8335,8 @@ lookup_compiler (const char *name, size_t length, const char *language)
{ {
if (name != NULL && strcmp (name, "-") == 0 if (name != NULL && strcmp (name, "-") == 0
&& (strcmp (cp->suffix, "@c-header") == 0 && (strcmp (cp->suffix, "@c-header") == 0
|| strcmp (cp->suffix, "@c++-header") == 0)) || strcmp (cp->suffix, "@c++-header") == 0)
&& !have_E)
fatal_error (input_location, fatal_error (input_location,
"cannot use %<-%> as input filename for a " "cannot use %<-%> as input filename for a "
"precompiled header"); "precompiled header");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment