From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49573 invoked by alias); 5 Jan 2019 10:31:21 -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 49555 invoked by uid 89); 5 Jan 2019 10:31:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:host81-, H*RU:sk:host81-, Stump, stump X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 05 Jan 2019 10:31:19 +0000 Received: by mail-wm1-f66.google.com with SMTP id g67so3305598wmd.2 for ; Sat, 05 Jan 2019 02:31:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Z+4zTvN9lRwd3aq1ianNpmSTMPuPQEwDAnl88fhI5Fg=; b=Y0aFht8BGGm/oKN9tOU+SyjAgfeNL1HO1vPahDWE1n51UTfL46OWvjkh7pke0R/QuQ nZytCNqEy3vj5BkbvWcBnx0Muj9UcIkpIREne5/+A+szGl9Y28BhbAydmJhbP1ptK/Nb dwNCbI3l5/pIwkeCi68Dg02lIGF2vT3vEYW9zdIOUygKSWokx6UN+8GncrbyEr/vkKMK lPn+alFwqgbwoiJPpcTmaiYtySERvWdk1Q6e8x8HTefUQbqw28252tUDB2RzlOUYh1rd Iy4iFqtjIcuWrJeyn7fsoUZ/r7Yq1P8+O+3bvFesU+jtZdbiJj/fy/Rz5tQE3UbdzUFl /hwg== Return-Path: Received: from euterpe-sie.home (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id k3sm80272616wrm.7.2019.01.05.02.31.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 02:31:16 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH] restore CFString handling in attribute format (PR 88638) From: Iain Sandoe In-Reply-To: <7F4803D9-451F-4DFC-AC93-CDA68F742693@comcast.net> Date: Sat, 05 Jan 2019 10:31:00 -0000 Cc: "gcc-patches@gcc.gnu.org" , Mike Stump Content-Transfer-Encoding: quoted-printable Message-Id: <4E249F38-0BA6-4937-BFBC-22D4D93331A3@googlemail.com> References: <7F4803D9-451F-4DFC-AC93-CDA68F742693@comcast.net> To: Martin Sebor X-SW-Source: 2019-01/txt/msg00200.txt.bz2 Hi Martin, > On 4 Jan 2019, at 22:30, Mike Stump wrote: >=20 > On Jan 4, 2019, at 2:03 PM, Martin Sebor wrote: >>=20 >> The improved handling of attribute positional arguments added >> in r266195 introduced a regression on Darwin where attribute >> format with the CFString archetype accepts CFString* parameter >> types in positions where only char* would otherwise be allowed. >=20 > You didn't ask Ok? I'll assume you want a review... The darwin bits and= the testsuite bits look fine. >>=20 >> Index: gcc/doc/extend.texi >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- gcc/doc/extend.texi (revision 267580) >> +++ gcc/doc/extend.texi (working copy) >> @@ -22368,10 +22368,12 @@ bit-fields. See the Solaris man page for @cod= e{cm >> @node Darwin Format Checks >> @subsection Darwin Format Checks >>=20=20 >> -Darwin targets support the @code{CFString} (or @code{__CFString__}) in = the format >> -attribute context. Declarations made with such attribution are parsed = for correct syntax >> -and format argument types. However, parsing of the format string itsel= f is currently undefined >> -and is not carried out by this version of the compiler. >> +In addition to the full set of archetypes, Darwin targets also support >> +the @code{CFString} (or @code{__CFString__}) archetype in the @code{for= mat} >> +attribute. Declarations with this archetype are parsed for correct syn= tax >> +and argument types. However, parsing of the format string itself and >> +validating arguments against it in calls to such functions is currently >> +not performed. >>=20=20 >> Additionally, @code{CFStringRefs} (defined by the @code{CoreFoundation}= headers) may >> also be used as format arguments. Note that the relevant headers are o= nly likely to be >>=20 I find =E2=80=9Carchetype(s)=E2=80=9D to be an usual (and possibly unfamili= ar to many) word for this context. how about: s/archetype in/variant for the/=20 and then s/with this archetype/with this variant/ in the following sentence. However, just 0.02GBP .. (fixing the fails is more important than bikeshedd= ing the wording). Iain