public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>,
	gcc-patches@gcc.gnu.org
Cc: yvan.roux@foss.st.com
Subject: Re: [PATCH] c++: Allow module name to be a single letter on Windows
Date: Tue, 8 Nov 2022 07:10:14 -0500	[thread overview]
Message-ID: <f9b25da8-1e97-c0bb-2dcd-b18b8f716763@acm.org> (raw)
In-Reply-To: <67003a2e-3f12-2794-3cd9-4b93650baafc@foss.st.com>

On 11/8/22 05:18, Torbjorn SVENSSON wrote:
> Hi Nathan,
> 
> On 2022-11-08 00:03, Nathan Sidwell wrote:

>>
>> Yes, something like the above, but I think you're missing "/bob' in the 
>> DOS_BASED case?  shouldn't that also be a pathname?
>>
>> if (IS_DIR_SEPARATOR (ptr[ptr[0] == '.']) // ./FOO or /FOO
>> #if HAVE_DOS_BASED_FILE_SYSTEM
>>      // DOS-FS IS_ABSOLUTE_PATH thinks 'A:B' is absolute, but we need to consider
>>      // that as a module:partition.
>>      || (HAS_DRIVE_SPEC (ptr) && IS_DIR_SEPARATOR (ptr[2])) // A:/FOO
>> #endif
>>      || false)
>>     return ....
>>
>> Does (something like) that work?
> 
> I tested it and your solution appears to work.
> Are you okay with me pushing that solution or do you want me to send a v2 with 
> it first?

I think it needs a better introductory comment than the one I slapped in there. 
More explanation of the drive vs partition distinction.  Something along the 
lines of 'things that clearly start as pathnames are header-names, everything 
else is treated as a (possibly malformed) named module.

Feel free to just go with it, or iterate here

nathan

-- 
Nathan Sidwell


      reply	other threads:[~2022-11-08 12:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28  9:15 Torbjörn SVENSSON
2022-11-03 14:17 ` Nathan Sidwell
2022-11-03 15:06   ` Torbjorn SVENSSON
2022-11-07 23:03     ` Nathan Sidwell
2022-11-08 10:18       ` Torbjorn SVENSSON
2022-11-08 12:10         ` Nathan Sidwell [this message]

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=f9b25da8-1e97-c0bb-2dcd-b18b8f716763@acm.org \
    --to=nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=torbjorn.svensson@foss.st.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).