From owner-svn-src-all@FreeBSD.ORG Sun Jun 19 12:15:59 2011 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 F0209106564A; Sun, 19 Jun 2011 12:15:59 +0000 (UTC) (envelope-from ben@links.org) Received: from mail.links.org (mail.links.org [217.155.92.109]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB2A8FC0A; Sun, 19 Jun 2011 12:15:59 +0000 (UTC) Received: from [193.133.15.218] (localhost [127.0.0.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.links.org (Postfix) with ESMTPS id C5D0A33C21; Sun, 19 Jun 2011 13:15:58 +0100 (BST) Message-ID: <4DFDE87E.2050309@links.org> Date: Sun, 19 Jun 2011 13:15:58 +0100 From: Ben Laurie User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Kostik Belousov References: <201106181356.p5IDuXhW044171@svn.freebsd.org> <20110618174531.GW48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110618174531.GW48734@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Ben Laurie , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223262 - in head: cddl/contrib/opensolaris/lib/libdtrace/common contrib/binutils/bfd contrib/binutils/gas contrib/binutils/gas/config contrib/binutils/ld contrib/binutils/opcodes contr... 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: Sun, 19 Jun 2011 12:16:00 -0000 On 18/06/2011 18:45, Kostik Belousov wrote: >> Modified: head/sys/sys/param.h >> ============================================================================== >> --- head/sys/sys/param.h Sat Jun 18 13:54:36 2011 (r223261) >> +++ head/sys/sys/param.h Sat Jun 18 13:56:33 2011 (r223262) >> @@ -319,4 +319,10 @@ __END_DECLS >> #define member2struct(s, m, x) \ >> ((struct s *)(void *)((char *)(x) - offsetof(struct s, m))) >> >> +/* >> + * Access a variable length array that has been declared as a fixed >> + * length array. >> + */ >> +#define __PAST_END(array, offset) (((typeof(*(array)) *)(array))[offset]) >> + >> #endif /* _SYS_PARAM_H_ */ > > The "typeof" there should be "__typeof", most likely. Hmm. Clang's own headers use __typeof__, it seems. gcc's docs also use __typeof__. -- http://www.apache-ssl.org/ben.html http://www.links.org/ "There is no limit to what a man can do or how far he can go if he doesn't mind who gets the credit." - Robert Woodruff