From owner-svn-src-all@FreeBSD.ORG Fri Apr 16 12:49:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C61B81065786; Fri, 16 Apr 2010 12:49:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 4345B8FC1A; Fri, 16 Apr 2010 12:49:51 +0000 (UTC) Received: from besplex.bde.org (c122-106-149-225.carlnfd1.nsw.optusnet.com.au [122.106.149.225]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o3GCnmmK013322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Apr 2010 22:49:50 +1000 Date: Fri, 16 Apr 2010 22:49:48 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Colin Percival In-Reply-To: <4BC84B3D.90302@freebsd.org> Message-ID: <20100416222439.M2697@besplex.bde.org> References: <201004152141.o3FLf7WX025585@svn.freebsd.org> <20100416210721.W1238@delplex.bde.org> <4BC84B3D.90302@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r206687 - head/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Apr 2010 12:49:52 -0000 On Fri, 16 Apr 2010, Colin Percival wrote: > Bruce Evans wrote: >> On Thu, 15 Apr 2010, Andriy Gapon wrote: >>> It seems that identifier "_t" is sometimes used as a variable name, >>> even in our tree. [...] >> >> Funny. POSIX reserves "_t" as a suffix in header files, so unless it >> also requires a non-null prefix, "_t" is reserved in POSIX. > > I think you must be reading a different version of POSIX to me. My version says > that symbols ending with "_t" may be defined in any header; but not that they > cannot be used in non-headers. No, it seems to be almost the same version, but my reading is more lawerly :-). I looked mainly at POSIX.1-1996. They are reserved if any POSIX header is included. I thought that they were reserved only for typedefed names, but can't see any restriction in the 1996 version. Whether they can be used in a non-header that includes a POSIX header depends on scope rules. They can't be used at file scope for obvious reasons. If they are only reserved for typedefed names, then they can be used for other names in inner scope, provided you compile with a C compiler (no -Wshadow -Werror). If they are reserved for any use, then it is hard to think of any valid use in a non-header. Uses like "auto int foo_t;" would fail if foo_t were a macro which expands to almost anything. Bruce