From owner-svn-src-all@FreeBSD.ORG Tue Dec 13 19:39:25 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 11206106566B; Tue, 13 Dec 2011 19:39:25 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00B0B8FC14; Tue, 13 Dec 2011 19:39:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBDJdOBt064327; Tue, 13 Dec 2011 19:39:24 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBDJdOm4064325; Tue, 13 Dec 2011 19:39:24 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112131939.pBDJdOm4064325@svn.freebsd.org> From: Ed Schouten Date: Tue, 13 Dec 2011 19:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228478 - head/sys/sys 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: Tue, 13 Dec 2011 19:39:25 -0000 Author: ed Date: Tue Dec 13 19:39:24 2011 New Revision: 228478 URL: http://svn.freebsd.org/changeset/base/228478 Log: Reimplement CTASSERT() using _Static_assert(). Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Tue Dec 13 19:37:27 2011 (r228477) +++ head/sys/sys/systm.h Tue Dec 13 19:39:24 2011 (r228478) @@ -92,10 +92,8 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUES } while (0) #endif -#ifndef CTASSERT /* Allow lint to override */ -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] +#ifndef CTASSERT /* Allow lint to override */ +#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed") #endif /*