From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 2CC35388553E for ; Wed, 26 Oct 2022 21:04:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2CC35388553E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666818250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4A6dfGkvBf4E8+BBAGl+TfLZkF5A8ruM/mE4nREMif0=; b=BwudBjcS7c8xB1RbekHHvxkeLZ6E1ddloJg0LaCH5kMlofSDP2mNuYvN2F3XuN3h7IGc8f iBgX/yQBNVzwXcMxhBCCguZKXPfWqSJ/tt2ZcLIf3yhzRlaWIm8leOPsdzKKjePGNgOOaO pTqAGV+cx6JYhwXTL5bFTN1eg/U8hPI= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-470-5N3TkYLYNY-wpk0V4C5Uug-1; Wed, 26 Oct 2022 17:04:09 -0400 X-MC-Unique: 5N3TkYLYNY-wpk0V4C5Uug-1 Received: by mail-qk1-f197.google.com with SMTP id w13-20020a05620a424d00b006e833c4fb0dso14944475qko.2 for ; Wed, 26 Oct 2022 14:04:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4A6dfGkvBf4E8+BBAGl+TfLZkF5A8ruM/mE4nREMif0=; b=VrEK+sMiPu6wud1gcwrlmWr5dxREEzUXT65dxQ3QZynyZW5WqXponRbfXCpELQFBl2 k/LsKQepEF7tzI4Rzd7re+iGOSz6lezjnQw33smwwm7C86HZq54Y/4SWqRyndljIG5JD B/cG40HcuuImwncSrIlWJ/MtvdZW/kdL0ikwVMRVRBa1Sx/J6fvaiHeX86mbaClktXwF 3jHPMhrnSmAAI376GfnjP90AiEP6ozHjyPiXE4jN66dwWmDrdysmO0y5jmGixv/GB4E6 sDv/Cdj+r5G09o/rLZyP68VyWdtM6w8ikxzwgQA4VlgtNaiQCCkNV8ZdBPwNlJPcJu4k 1Uzg== X-Gm-Message-State: ACrzQf3v/SZqsg94dUfD5zJkeHTrojdPvXd90SiH09KQZoCXtbMDao6W awKfA6DwdAm2g/02qMiMvFBVtCmJ8XefbTjWmBZbuOEBySo3xdephQua9sYDGOPAnNBAQ5T+5oF jOz74gpOc/D8xDw== X-Received: by 2002:a05:622a:18d:b0:39a:b98e:3d2b with SMTP id s13-20020a05622a018d00b0039ab98e3d2bmr39213385qtw.465.1666818248916; Wed, 26 Oct 2022 14:04:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4qD29OCjls3vZuaq16Pw2krY7edhx76b0cRt7ormcluiD1f4hU4TZ3jOm7HWTZGYmTWcb9tA== X-Received: by 2002:a05:622a:18d:b0:39a:b98e:3d2b with SMTP id s13-20020a05622a018d00b0039ab98e3d2bmr39213361qtw.465.1666818248671; Wed, 26 Oct 2022 14:04:08 -0700 (PDT) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id z4-20020ac86b84000000b0035d432f5ba3sm3711922qts.17.2022.10.26.14.04.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 14:04:08 -0700 (PDT) Message-ID: <444c66ac8c8e0062d9aa93d866dc92a4c1ad3fa9.camel@redhat.com> Subject: Re: [PATCH Rust front-end v3 35/46] gccrs: Add metadata ouptput pass From: David Malcolm To: arthur.cohen@embecosm.com, gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org Date: Wed, 26 Oct 2022 17:04:07 -0400 In-Reply-To: <20221026081811.602573-36-arthur.cohen@embecosm.com> References: <20221026081811.602573-1-arthur.cohen@embecosm.com> <20221026081811.602573-36-arthur.cohen@embecosm.com> User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham 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 Wed, 2022-10-26 at 10:18 +0200, arthur.cohen@embecosm.com wrote: > From: Philip Herron >=20 > Extern crates statements to tell the front-end to look for another > library. > The mechanism here is heavily inspired from gccgo, so when we compile > a > library for example we invoke: >=20 [...snip...] > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rust_error_at (Location (), > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "expected metadata-output path t= o have base file > name of: " > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "%<%s%> got %<%s%>", > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 expected_file_name.c_str (), pat= h_base_name); I can't comment on the patch in depth, but does rust_error_at call into GCC's regular diagnostics? If so, "%qs" is a more idiomatic way to express printing a string argument in quotes (and bold), rather than "%<%s%>", though IIRC they do the same thing (unless I'm missing something?). This shows up in a few places in this patch, and might affect other patches in the kit - though it's a minor nitpick, of course. Dave