From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by sourceware.org (Postfix) with ESMTPS id 500DF3858D1E for ; Tue, 8 Nov 2022 12:10:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 500DF3858D1E Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-x830.google.com with SMTP id w4so8540732qts.0 for ; Tue, 08 Nov 2022 04:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=mPgvgI5SQv+GdiDZ2mao1+pQot5wNKYhFOKqWn43cE0=; b=CbmvO1NV24kZO35QOLvaW3mzxx2FWxPm0mvb+EdZNoxD/P/sTmhmNImaeL4DgFRrbW G1M+15kQAJSTHzRd9ATqdytPCvP1++XDSkk3+tw5r6by7riBwXEDFJnz34X/kfM2F9KD bVNLdUhKdyQxbyzOwiV8uANNIFj8GmaouIme1OpVWPaF27eT68gpUBf8FsNKNbp7NYeG bz2hyYJUI7up0x/tk8m3/Cy9oUo9letCrb83kYq5Lo2XAbRilokDw4dCF2M824XF2h/r 8T61mhIS7hihSMFsBbgjGMZWpUJvSe4h6E1hvWG8sPIk8BBPsGcdGlnRPqaJQffHnjiQ aWew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mPgvgI5SQv+GdiDZ2mao1+pQot5wNKYhFOKqWn43cE0=; b=RStQIuHar+vbsz3oOu9PqUBiFaxM4nO7wJ4xiwbjvKp9i6atP5ijRaKBbq03U8yRr+ Jcl/88GO9BR9obOcd0O804dmQYiCdFsHIIYxTCATFKyw2a/9MYZrugRWigPG80rD1wIN qZL24iBkXCUsXalJ1MgX2bLnZPwf9d97Y7xiMRhlE9+4RB7ObOh4f7mLRnQ1OvV1raIG u2DxUr0VZpF2VbQbDsB0CJNz1MDfStVLUuSHnmrU0dUsd5XgBqcUq6ovcRTLxVeFcFkz DrNoHsleFeOg/+VEQJFbpyJi5SEu8HC1sP8nvZBzPqQEHfMG7ksY2w93G4/9uO98V7Da uYpA== X-Gm-Message-State: ACrzQf0uj2A7Vzx7qNe3rmxY/fTlGZ9JWnSFfd9gjsdyvC2BRevXJiVI hAtZMMk4XRkDsDZULGv9gRQ= X-Google-Smtp-Source: AMsMyM4XEJkiMCXgKOOTiM5hT4ncj7WCSnNP+Cbrxts4jk9B13ffKNRtp5+L3+qZfMAaf86OFbH5gQ== X-Received: by 2002:ac8:45d1:0:b0:3a5:ef4:673b with SMTP id e17-20020ac845d1000000b003a50ef4673bmr42680604qto.646.1667909415528; Tue, 08 Nov 2022 04:10:15 -0800 (PST) Received: from ?IPV6:2601:19c:527f:bfd0::5? ([2601:19c:527f:bfd0::5]) by smtp.googlemail.com with ESMTPSA id j19-20020a05620a289300b006b949afa980sm9177410qkp.56.2022.11.08.04.10.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 04:10:15 -0800 (PST) Sender: Nathan Sidwell Message-ID: Date: Tue, 8 Nov 2022 07:10:14 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH] c++: Allow module name to be a single letter on Windows Content-Language: en-US To: Torbjorn SVENSSON , gcc-patches@gcc.gnu.org Cc: yvan.roux@foss.st.com References: <20221028091500.2748920-1-torbjorn.svensson@foss.st.com> <6c6abd06-ae1a-059b-a376-db738af5506e@acm.org> <64a79925-652c-60b3-1c19-86c1880e7d0b@foss.st.com> <78f9a5af-fd84-00e3-feb4-6130a7911593@acm.org> <67003a2e-3f12-2794-3cd9-4b93650baafc@foss.st.com> From: Nathan Sidwell In-Reply-To: <67003a2e-3f12-2794-3cd9-4b93650baafc@foss.st.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3031.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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