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 595B2382C144 for ; Wed, 26 Oct 2022 21:04:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 595B2382C144 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=1666818251; 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=PhA9T8zZC3AsnfWp5ZZCfhgRIlqgzS6SbFeCT+Ecjj0YPYUruRT2x8sBFuxm7lvCb7iVoY PXwVacv+nUbcX+YZdG/P10msWrYPWJOhzrZgfW4V/MRgjxfAcAHgfy/ra0zwNTtIP8JFWA 2Nw4VM9W5aqsNB8lskjyTutECTx8VVE= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-474-k2AG2IOpPKS4_HBe3jq5ZA-1; Wed, 26 Oct 2022 17:04:09 -0400 X-MC-Unique: k2AG2IOpPKS4_HBe3jq5ZA-1 Received: by mail-qt1-f199.google.com with SMTP id c11-20020ac87dcb000000b0039cdb815f3bso12090754qte.4 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=t1ssfKP+piXrp2dM1VEdvsALZm1/zuz41W4YSrvby9ThFu5sFH7US65sHzacg90ho5 tnPSYYpx85ACpl0EwmuxqGdDfx0mb0M6RJkx/d51HsAFF9adirvn5n93TuL7pw7j5HxU SlUqYlrGTfi4/+AiF9f9mgWuHCGY4RJzn03yi7SQ2hDbP2s8778BGTliqyHNvl5Z87nq HeRGy1ZE2ChzFiYJP3unERKDt1Wy+46h3Dy0TMydaWL2TwWQ9rODZXEC8uHzyNKHiqY+ aobKd4zPVS7NyYOM1Jtcq9jQaSnh3SVKuqec39jFQyB3Bz4060aFsb9GVv5NA72zIctD iI+Q== X-Gm-Message-State: ACrzQf1Jz13kCRCBnODe1U9umOAVdwryJfLZooAEqlk0e1tHxuLwfrev 0QHyyV8sVIqoNYWoEOrdMj0MwlfaNQw/Y5Fbto4bb27bKt7TwZGmYr8JIlacPSUGYlLaUiIB1GW AOe11Y8XH1FRzsCYMwg== X-Received: by 2002:a05:622a:18d:b0:39a:b98e:3d2b with SMTP id s13-20020a05622a018d00b0039ab98e3d2bmr39213383qtw.465.1666818248915; 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=-2.2 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