From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 4557B3858D28 for ; Sun, 5 Feb 2023 08:07:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4557B3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x330.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so8726206wmb.4 for ; Sun, 05 Feb 2023 00:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dvhExOib8z3096Kxa0mepmq8UTgDD/TUcyevLVqz3kw=; b=akAG/JNqCP+n3I27xDo7jrbRDnVWQYySCbNVhMM8p6LjQd6oS1Ti6f7UnBNOMN5cQ3 +jrGvFT9IP/AHRjY4GUFnfhn5r9Mf0+LSu0+RzDdXs6U5/Ck9v157lTOUYjIezUMMa/c x3rE0s1GXb1ZE1jTc/OCudMuVwKnP3HctndVVRTpkZCYxl6uXjlzzhJFPnNzScTsDkTQ CC1hVj94oXCn8YATRerx9iwpFP4dKleVa3btLN8xawnyNWW0xiuF0QlS23PEeArQdEEN RWr3J4Y2rtZ9uyO2eS2LaakcOBdKmF0MSSm7QVZjvLPNYApN1yYpGkmJRlrSFpN/9VS4 rx6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=dvhExOib8z3096Kxa0mepmq8UTgDD/TUcyevLVqz3kw=; b=0gtxB7SO/G0ca5ZAHKR4SdG6cMEWeBmtugWny4RAZfKb002gYM/cIfhC9OSgiKNpe7 sB+xAscQ6bVyZc8xG+59+jmlh+Dluu8S+xH0SarFKLAb0ameIsk7vUMqgWUe3UV35xob qcTEhXsFJhgJn0rOKK0pubCuoTygubNvrfge2vwO2hoXSDuBSiu6h0zVLQZJn8k7EgCD apw7ysSU91tBsaBiT9+qddyV3CzM8CXOGQyCR9PGmRmvZIfB9YfHy5hdDflzRcdKf8Qy sNMQUzjXR6FfMW8GjkN91wuZ8HROyPGfHZVCMg+RaveiQDa5+TIj9a9Tvi25o5r5A1om 5uYQ== X-Gm-Message-State: AO0yUKU7rS+sd2MBTh8mxmhIBupnCk1X+IByAmSG6r6sr4pkMpLpgpgA dfk/9GLGgUHfgWioS5owAojcZ3wrnw+hIJQ/lv0= X-Google-Smtp-Source: AK7set9WIoTJhiogcY1wOOimsPrHK91HeaekOYBjD0VjpyVeB0qmQfQRdpfV+qwBrxGVGGGCw0EUrsYLQU+wcCG32gw= X-Received: by 2002:a05:600c:4e01:b0:3df:f127:ef64 with SMTP id b1-20020a05600c4e0100b003dff127ef64mr269391wmq.26.1675584436774; Sun, 05 Feb 2023 00:07:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Christopher Bazley Date: Sun, 5 Feb 2023 08:07:05 +0000 Message-ID: Subject: Re: _Optional: a type qualifier to indicate pointer nullability To: Jonathan Wakely Cc: "gcc@gcc.gnu.org" Content-Type: multipart/alternative; boundary="000000000000252c4705f3ef67cf" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: --000000000000252c4705f3ef67cf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 4 Feb 2023 at 23:53, Jonathan Wakely wrote: > > > On Sat, 4 Feb 2023, 21:23 Christopher Bazley, wrote: > >> >> >> On Sat, 4 Feb 2023 at 20:40, Jonathan Wakely >> wrote: >> >>> >>> On Sat, 4 Feb 2023, 17:01 Christopher Bazley via Gcc, >>> wrote: >>> >>>> >>>> Does the lack of support for Clang's nullability qualifiers in GCC >>>> indicate >>>> a greater likelihood for my proposed feature to be accepted into GCC? >>> >>> >>> No, I don't think so. I think it would be better to support the same >>> qualifiers as Clang, not diverge in this way. >>> >> >> Clang=E2=80=99s _Nullable qualifier is broken and pretty useless (even a= ccording >> to the code owner), so good luck with that. >> > > But marking pointer arguments as non-null is already supported in GCC > (with an attribute on the function, not the argument). Supporting a nonnu= ll > attribute on individual arguments seems useful to me. Far more than marki= ng > pointers as maybe-null, which is already true for all pointers. > Sorry, but I get the feeling that you didn=E2=80=99t read my article. If yo= u could spare the time, it would help you to understand where I=E2=80=99m coming fr= om. Saying =E2=80=9Cit=E2=80=99s already true that all pointers can be null [th= erefore there=E2=80=99s no need for =E2=80=98_Optional=E2=80=99 in the type system]=E2=80=9D is as = facile as saying =E2=80=9Cit=E2=80=99s already true that all values in Python can be None=E2=80=9D. I=E2=80=99d sooner trust Guido van Rossum on this question than Bjarne Stro= ustrup, since the former actually *likes* C and uses it, whereas the latter describes C as a perverse mess (and certainly doesn=E2=80=99t use it). --=20 Christopher Bazley --000000000000252c4705f3ef67cf--