From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by sourceware.org (Postfix) with ESMTPS id 5C6093858D33 for ; Wed, 8 Nov 2023 00:03:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C6093858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C6093858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699401787; cv=none; b=kqlkflrypFsH86k3CtHrSAdeljKRskZyKNmMwMExnPiK7BmQNnPslV5D/H8pf7JthSnvR2gNI1646kgJD1MQjWXES37YQb5A92S2FLXZaLaX+5bIrQ1OU4KeKLVSvIRWwiQhRksts60kOLCfbxM7/KdqT4n/Cg+zF4hjmh6zviM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699401787; c=relaxed/simple; bh=NsegyCcat2g1JSi/+HWtZy+A94e+Wl+TNra6RSsCCbc=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=fW3oUi41v+CEXNkBVAC566UWwv0pE+K8Xc/biOmMkuOR4VnGbvOZqoP/F+Rrb5S46hDKZlLDWHKvSYES/jDZX69xUKIsLXXTrNMTwlJOGNXsNLVxDLKh2gl37VKKB1eRppnb2nWd2OO3FnHxPHx40d7axjORZHKgBzq1JgR3tzk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-5ae143e08b1so74346697b3.1 for ; Tue, 07 Nov 2023 16:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699401783; x=1700006583; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RRboL192cN94z54z59n692bCklDiIFFgGwb+ha2mapo=; b=HDbq3iha9wtvZNkhi+QNL6gdmqcTkM8ZZ7YTIvnie8mfbFE/CR2HnDngpB1Utz8NM5 oh2Zj/ImRXDSchiHDhB5cRBG3u+I5c4rN638gNBUDHw269j53aNggFeH+YLIwoy3ezY1 DAy13x/w/7tzWBKxTrrns+D7BFUSoKQEBti8q2kqBK7EsG/qf5iCEpZLO79oz8ZO84zc xtuLApDk0eajN451LjdBpyDD3xYkKovXatF0GIGXrdf3IvwWtaCG2aetELmnAXvQkc1j IclirzI2zbbLXakU5tDM70Ksl0tl/b7hj8gOGMlq9n5p92R1664pquS5OAmwTteYcBdH U2Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699401783; x=1700006583; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RRboL192cN94z54z59n692bCklDiIFFgGwb+ha2mapo=; b=LO5VIqSpPEDBNG5h3PzOdF1VQRpf4jBz/qa9BigiWVPRiu6FbToX5l0nsov6bEt0uQ KOr4bitt69ZnSy0IQlzPiDIaFxT8cGRp7GBup2ENvF6LKhaLn+SFUbdEtEqLDrPttyh1 rSLedPmnPuNYj9hZKniXFINBVX1zN5TZt9Vex90jm2DVbFmJDVpT5SbLsOSDXml4AlX3 OusCexGXB74GsMhMd/MSs8ubg33uZrNPeYELS7I1dqiiaL0TIuTA5TZjTf5+rHqinWUC 4tz/9Um/DjMuNdf/SylnWA+ZRHVmLlH7U/qbSYTPZ3IHUJyzNha8ba/bZpAiWfXyNZjl tLFg== X-Gm-Message-State: AOJu0YwJqsAhVMJ27UmNh45w1nCJ0FUpjISHi26wBIUVY2MXEMk1mLRg WsOKAZwiH52/4mXFiBA8zm4TzdqtveMwhQIduDk= X-Google-Smtp-Source: AGHT+IEehlNsTGldUj8VhIg4DD6I/5sGhO5AmknSXdmlJnZUW4+OWbDb4+vI1ZpDj2r0o+oQnbRCna+dg9VZziGQ+ts= X-Received: by 2002:a0d:e814:0:b0:59f:9c08:8f12 with SMTP id r20-20020a0de814000000b0059f9c088f12mr224673ywe.38.1699401783351; Tue, 07 Nov 2023 16:03:03 -0800 (PST) MIME-Version: 1.0 References: <20231106222959.2707741-1-dmalcolm@redhat.com> <20231106222959.2707741-2-dmalcolm@redhat.com> In-Reply-To: <20231106222959.2707741-2-dmalcolm@redhat.com> From: Lewis Hyatt Date: Tue, 7 Nov 2023 19:02:51 -0500 Message-ID: Subject: Re: [PATCH 1/2] libdiagnostics: header and examples To: David Malcolm Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3029.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Mon, Nov 6, 2023 at 8:29=E2=80=AFPM David Malcolm = wrote: > > Here's a work-in-progress patch for GCC that adds a libdiagnostics.h > header describing the public interface, along with various testcases > that show usage examples for the API. Various aspects of this need > work; posting now for early feedback on overall direction. > > How does the interface look? > ... > +typedef unsigned int diagnostic_location_t; One comment that occurred to me... for GCC we have a lot of PRs that are unhappy about the 32-bit location_t and the consequent issues that arise with very large source files, or with very long lines that lose column information. So far GCC has been able to get by with "don't do that" advice, but a more general libdiagnostics may need to avoid that arbitrary limitation? I feel like it may not be that long before GCC needs to deal with it as well, perhaps with a configure option, but even now, it could make sense for libdiagnostic to use a 64-bit location_t itself from the outset, so it won't need to change later, even if it's practically restricted to 32 bits for now. -Lewis