From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 2DF7C3858003 for ; Thu, 2 Dec 2021 20:36:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2DF7C3858003 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: piEVw8MLr7RaktB+gwRuwcYvl9I1CCuvGkfYMZsms7ziUTLG36BidTHa0eSNergOnv5Cv5wixi Htmt56kDxyZRkQ3cBCwmglCl+WRSJcstnvPrPmXHagZNYLRzVE3FZ7sFPMOjK0EGkkIQy36O/2 xSEqz9KdE2ghYDpv1xORZ7C8nu0woylkiCRB2BQ8ag4qCgf4mgKyaDIoBr+61fScMbhtjTJTHt ki0Bvx2/JY7zpUbQVKNNVgv5aTJ+gsZkydPtFauQQLZqKCwu/dSqEOADZqhQFhjHFyvZFi7FZG E6hF/Y6UjZ8+FVvGq2Hj/6c4 X-IronPort-AV: E=Sophos;i="5.87,282,1631606400"; d="scan'208";a="69060337" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 02 Dec 2021 12:36:53 -0800 IronPort-SDR: 69K7Ji7Bo+tMhwBDA+36TmxQOxwGEsYK5zYrcushfZZADCFCKuGcxe7LZl4WGhLXQQS51K2w4d m9BN6Gw96F6cOMVABR0uHThxPA2vjsXb1CjkPNhsGXmExe6BGN+joOh2ne19t1286uXuivu2AH RsndmIA2h/TppNfuChsXqbs9r5WZCV4RcbiV8sgDH1ag220sTEAay9wRcaaHU3v9CFDx3VI1Y3 ZvxxS45bxCTFY3wBa576asUC8lpxnXvbPIiT1kHxsHjOcToaLUYugymxp+b72bhTwkr4/uJDym PzU= Date: Thu, 2 Dec 2021 20:36:48 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: "Alejandro Colomar (man-pages)" CC: , Subject: Re: ISO C3X proposal: nonnull qualifier In-Reply-To: <3178a917-e9df-36eb-4382-f8aec7b678a2@gmail.com> Message-ID: References: <56a1a945-608e-0e5e-7610-c35481abb980@gmail.com> <4883fa8c-2d99-2611-a8e2-6c7612283da4@gmail.com> <3178a917-e9df-36eb-4382-f8aec7b678a2@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3116.5 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Dec 2021 20:36:56 -0000 On Thu, 2 Dec 2021, Alejandro Colomar (man-pages) via Gcc wrote: > So, now this can be made non-flow-sensitive, which was a big concern. And now > the biggest concern I can see is that this qualifier works opposite to const > (here discarding is allowed but not adding it), and that is contrary to how For all existing qualifiers, the rules about discarding are rules about permitted assignments (and conversions as if by assignment) between pointers and concern the qualifiers on pointer target types: 6.5.16.1 is the key subclause concerning implicit conversions, and any proposal for changes in that area needs to be precise about exactly what textual changes are proposed to 6.5.16.1. > compilers have been working for now. As far as I could read in the standard, > there's no mention to qualifiers being dropped in an rvalue; Joseph, could you > please confirm? Also, as I already mentioned, Clang already implements this lvalue-to-rvalue conversion drops qualifiers (and _Atomic). "If the lvalue has qualified type, the value has the unqualified version of the type of the lvalue; additionally, if the lvalue has atomic type, the value has the non-atomic version of the type of the lvalue; otherwise, the value has the type of the lvalue." (6.3.2.1). -- Joseph S. Myers joseph@codesourcery.com