From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101067 invoked by alias); 30 Sep 2019 21:34:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 101055 invoked by uid 89); 30 Sep 2019 21:34:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1055 X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Sep 2019 21:34:42 +0000 IronPort-SDR: /Rxn3VJapNJCAqIlwKW44R0KUgblTcBgCYXgLd6M1cMR2EPVmkYybSfjzVoSGb8q5QZ/hWCtym pj1tIdR3MifiKqc2cINGPj0q0Svg9XPxqYYL06llRFhKnePyoDvvlyeZvLRa/oyLnJwZ6ooGg7 cMSTI9sNikDNCrkGhhHLui2szqfa5oxZesLYTIO7ezVU8MjGlVf6CjcyTB6zeAWvh3NVd6CfAl Yi822CrMt2LigO3HFEN6MyGgsAbnKB+Kw6Zi5AI2yRMbnQ96xzprKYMyvFsYc3dxJVKHfv2kPP 2+o= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 30 Sep 2019 13:34:40 -0800 IronPort-SDR: ePJZaNJitPcL+0uBC1Qq5PXMReTqc+zUIQZvlV4IDrtCN7KU+jZr0Xu4FriIltjnWlvTKd7U7l o9Lpp6obUnlNa8BFD7UdulPtKABBPQwxNEoDGwka1z/+Am8YLUJoQYCofs0kt9YiAjc6LuKCAx 2vDZcZQMTLzblUF/RrUSvBEqZMzuHfnHSXVt55q8jhdAAWAmgwWCI/yXeAVf7+5w1CnlqeM51V 5BEYIecKwkINVUvGd6gu2gS5SheEnENOUiPpfAtZ0DQetzoLFlWqV2Sg+FCKLkLJgP1wDCrPI8 q84= Date: Mon, 30 Sep 2019 21:34:00 -0000 From: Joseph Myers To: Martin Sebor CC: gcc-patches Subject: Re: [WIP PATCH] add object access attributes (PR 83859) In-Reply-To: <056e2b5b-696c-ca69-9027-7d2369354b07@gmail.com> Message-ID: References: <056e2b5b-696c-ca69-9027-7d2369354b07@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-Path: joseph@codesourcery.com X-SW-Source: 2019-09/txt/msg01814.txt.bz2 On Sun, 29 Sep 2019, Martin Sebor wrote: > PR 83859 asks to expose the same checking that GCC does natively for > built-in calls via a function attribute that associates a pointer > argument with the size argument, such as: I'll also note that, as mentioned in that bug (but more specifically covered by the separate bug 50584) it would make sense to have similar warnings with [static] parameter array declarators. And that the C2x charter includes a principle that new interfaces should have the array size before the array parameter to allow parameters to be declared using VLA syntax like that, so it's plausible the [static] case will be useful for more functions in future (although it's up to library implementations exactly what form they use in their headers, given they have other considerations such as C++ compatibility). Hopefully the infrastructure in this patch will facilitate future support for such diagnostics in the [static] case. -- Joseph S. Myers joseph@codesourcery.com