This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Martin Liška <mliska at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 05 Jan 2017 13:05:18 +0100
- Subject: Re: [PATCH] Fix precompiled header for '-' being input file (PR, pch/78970)
- Authentication-results: sourceware.org; auth=none
- References: <2577a04a-611e-ab46-b2c5-f39c71f02cca@suse.cz> <20170105091107.GW21933@tucnak> <d073288d-54e1-caa9-7e57-39dee23dbc6e@suse.cz> <20170105100947.GY21933@tucnak>
On Jan 05 2017, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Jan 05, 2017 at 11:01:37AM +0100, Martin Liška wrote:
>> diff --git a/gcc/gcc.c b/gcc/gcc.c
>> index 8154953eb1d..ea4af119e73 100644
>> --- a/gcc/gcc.c
>> +++ b/gcc/gcc.c
>> @@ -8325,7 +8325,19 @@ lookup_compiler (const char *name, size_t length, const char *language)
>> {
>> for (cp = compilers + n_compilers - 1; cp >= compilers; cp--)
>> if (cp->suffix[0] == '@' && !strcmp (cp->suffix + 1, language))
>> - return cp;
>> + {
>> + if (name != NULL && strcmp (name, "-") == 0
>> + && (strcmp (cp->suffix, "@c-header") == 0
>> + || strcmp (cp->suffix, "@c++-header") == 0))
>> + {
>> + fatal_error (input_location,
>> + "can't use '-' as input filename for a "
>> + "precompiled header");
>
> That would be can%'t
Better: cannot.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."