public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <yvan.roux@foss.st.com>, Tom Tromey <tom@tromey.com>
Subject: PING^2 [PATCH] cpp/remap: Only override if string matched
Date: Thu, 17 Nov 2022 17:44:42 +0100	[thread overview]
Message-ID: <8f93e61d-ad2e-7638-f113-93616ba498a6@foss.st.com> (raw)
In-Reply-To: <a42a02ab-0f49-7b2c-d582-af13c61579ee@foss.st.com>

Hi,

Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604898.html

Ok for trunk?

Kind regards,
Torbjörn

On 2022-11-02 19:21, Torbjorn SVENSSON wrote:
> Hi,
> 
> Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604062.html
> 
> Ok for trunk?
> 
> Kind regards,
> Torbjörn
> 
> On 2022-10-20 22:48, Torbjörn SVENSSON wrote:
>> For systems with HAVE_DOS_BASED_FILE_SYSTEM set, only override the
>> pointer if the backslash pattern matches.
>>
>> Output without this patch:
>> .../gcc/testsuite/gcc.dg/cpp/pr71681-2.c:5:10: fatal error: a/t2.h: No 
>> such file or directory
>>
>> With patch applied, no output and the test case succeeds.
>>
>> libcpp/ChangeLog
>>
>>     * files.cc: Ensure pattern matches before use.
>>
>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
>> ---
>>   libcpp/files.cc | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libcpp/files.cc b/libcpp/files.cc
>> index 24208f7b0f8..a18b1caf48d 100644
>> --- a/libcpp/files.cc
>> +++ b/libcpp/files.cc
>> @@ -1833,7 +1833,7 @@ remap_filename (cpp_reader *pfile, _cpp_file *file)
>>   #ifdef HAVE_DOS_BASED_FILE_SYSTEM
>>         {
>>       const char *p2 = strchr (fname, '\\');
>> -    if (!p || (p > p2))
>> +    if (!p || (p2 && p > p2))
>>         p = p2;
>>         }
>>   #endif

  reply	other threads:[~2022-11-17 16:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 20:48 Torbjörn SVENSSON
2022-11-02 18:21 ` PING^1 " Torbjorn SVENSSON
2022-11-17 16:44   ` Torbjorn SVENSSON [this message]
2022-11-20 20:31   ` Jeff Law
2022-11-21 12:38     ` Torbjorn SVENSSON

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f93e61d-ad2e-7638-f113-93616ba498a6@foss.st.com \
    --to=torbjorn.svensson@foss.st.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tom@tromey.com \
    --cc=yvan.roux@foss.st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).