Commit 79335075 by Jan Beulich Committed by Jan Beulich

fix interaction of -S and -x {c,c++}-header

Irrespective of the use of -o this so far resulted in "error: output
filename specified twice", since cc1_options already produces a -o
option when -S was specified.

gcc/
2016-07-04  Jan Beulich  <jbeulich@suse.com>

	* gcc.c (default_compilers["@c-header"]): Conditionalize "-o".

gcc/cp/
2016-07-04  Jan Beulich  <jbeulich@suse.com>

	* lang-specs.h ("@c++-header"): Conditionalize "-o".

gcc/testsuite/
2016-07-04  Jan Beulich  <jbeulich@suse.com>

	* g++.dg/header.c: New.
	* gcc.dg/header.c: New.

From-SVN: r237955
parent b32086d3
2016-07-04 Jan Beulich <jbeulich@suse.com>
* gcc.c (default_compilers["@c-header"]): Conditionalize "-o".
2016-07-01 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/71720
......
2016-07-04 Jan Beulich <jbeulich@suse.com>
* lang-specs.h ("@c++-header"): Conditionalize "-o".
2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
* parser.c (cp_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
......
......@@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see
cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2\
%{!fsyntax-only:-o %g.s \
%{!fsyntax-only:%{!S:-o %g.s} \
%{!fdump-ada-spec*:%{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}}%V}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
......
......@@ -1330,7 +1330,7 @@ static const struct compiler default_compilers[] =
%W{o*:--output-pch=%*}}%V}}\
%{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
cc1 %(cpp_unique_options) %(cc1_options)\
%{!fsyntax-only:-o %g.s \
%{!fsyntax-only:%{!S:-o %g.s} \
%{!fdump-ada-spec*:%{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
......
2016-07-04 Jan Beulich <jbeulich@suse.com>
* g++.dg/header.c: New.
* gcc.dg/header.c: New.
2016-07-02 Jakub Jelinek <jakub@redhat.com>
PR c/71719
......
/* This really should use "dg-do compile" without the -S in dg-options,
but the extra options get put after the input file in that case, and
hence the test would fail. */
/* { dg-do assemble } */
/* { dg-options "-S -x c++-header" } */
struct s {
unsigned field;
};
/* This really should use "dg-do compile" without the -S in dg-options,
but the extra options get put after the input file in that case, and
hence the test would fail. */
/* { dg-do assemble } */
/* { dg-options "-S -x c-header" } */
struct s {
unsigned field;
};
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