From: Jakub Jelinek Date: Wed, 11 Jan 2017 18:08:57 +0000 (+0100) Subject: re PR c++/72813 (atomic header cannot be compiled into translation unit with -fkeep... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b5b4e9cece66553b75c1c8c9e7ecae6c8b27bb0;p=gcc.git re PR c++/72813 (atomic header cannot be compiled into translation unit with -fkeep-inline-functions) PR c++/72813 * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps of c-header. * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing PCH file. * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after writing PCH file. From-SVN: r244328 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db74169e9df..e46392c2953 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-01-11 Jakub Jelinek + + PR c++/72813 + * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps + of c-header. + 2017-01-11 David Malcolm PR driver/78877 diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index a47e10c06ea..341407a21de 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2017-01-11 Jakub Jelinek + + PR c++/72813 + * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing + PCH file. + 2017-01-11 Richard Biener PR bootstrap/79052 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index a15903ac11b..2f91e706b4c 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -1420,6 +1420,8 @@ pop_file_scope (void) if (pch_file) { c_common_write_pch (); + /* Ensure even the callers don't try to finalize the CU. */ + flag_syntax_only = 1; return; } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 892651a7eeb..2b229f2aae7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2017-01-11 Jakub Jelinek + + PR c++/72813 + * decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after + writing PCH file. + 2017-01-10 David Malcolm PR c++/77949 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 435f51fe564..0a4c5671df1 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4461,6 +4461,8 @@ c_parse_final_cleanups (void) DECL_ASSEMBLER_NAME (node->decl); c_common_write_pch (); dump_tu (); + /* Ensure even the callers don't try to finalize the CU. */ + flag_syntax_only = 1; return; } diff --git a/gcc/gcc.c b/gcc/gcc.c index 98568bc1079..1c5e42802c5 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1328,7 +1328,7 @@ static const struct compiler default_compilers[] = %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ %(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}}\ %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\