From owner-freebsd-audit Thu Nov 30 18:49:35 2000 Delivered-To: freebsd-audit@freebsd.org Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id A967937B400 for ; Thu, 30 Nov 2000 18:49:29 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_18979)/8.9.3) with ESMTP id NAA14274; Fri, 1 Dec 2000 13:49:25 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01JX6XGPEXQOE7XDD0@cim.alcatel.com.au>; Fri, 1 Dec 2000 13:49:09 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.0/8.11.0) id eB12n3x03226; Fri, 01 Dec 2000 13:49:03 +1100 (EST envelope-from jeremyp) Content-return: prohibited Date: Fri, 01 Dec 2000 13:49:03 +1100 From: Peter Jeremy Subject: Re: gcc __attributes for format strings In-reply-to: <200011271604.eARG49V29464@troutmask.apl.washington.edu>; from sgk@troutmask.apl.washington.edu on Mon, Nov 27, 2000 at 08:04:09AM -0800 To: Steve Kargl Cc: audit@FreeBSD.ORG Mail-followup-to: Steve Kargl , audit@FreeBSD.ORG Message-id: <20001201134903.H1474@gsmx07.alcatel.com.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.2.5i References: <20001126222048.A46809@citusc17.usc.edu> <200011271604.eARG49V29464@troutmask.apl.washington.edu> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-Nov-27 08:04:09 -0800, Steve Kargl wrote: >Kris Kennaway wrote: >> Okay, looks like we can play with some gcc attributes to flag things >> as format strings. For example: >> > >[snip] > >> We need to go through and prototype functions appropriately (in >> headers, or internally) - I think it's possible to fix all of the >> -Wnon-const-format warnings this way. > >Are gcc attributes C89 or C99 features? If not, you probably >want to ask bde about sprinkling gcc only features throughout >the header files. In general, gcc attributes are not directly put in the code. Rather there are a series of macros in which map 4.4BSD attributes onto compiler-specific attributes. If we move to a different compiler, we just need to change cdefs.h Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message