From owner-svn-src-head@freebsd.org Sun Aug 2 16:41:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB8549B0334; Sun, 2 Aug 2015 16:41:14 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BB8551A21; Sun, 2 Aug 2015 16:41:13 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.0.7] (cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t72Gf66i082161 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Aug 2015 16:41:11 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc16-cmbg15-2-0-cust60.5-4.cable.virginm.net [86.5.162.61] claimed to be [192.168.0.7] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r286168 - head/sys/net From: David Chisnall In-Reply-To: <1438533273.50703.2.camel@freebsd.org> Date: Sun, 2 Aug 2015 17:42:05 +0100 Cc: "Bjoern A. Zeeb" , John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <064AFABE-35B4-48B9-9F95-545792504984@FreeBSD.org> References: <201508020015.t720Fr6R018929@repo.freebsd.org> <1438533273.50703.2.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2015 16:41:15 -0000 On 2 Aug 2015, at 17:34, Ian Lepore wrote: > > It generates a compiler error, so the output is going to contain > file-and-line like any other compiler error, as well as the message from > the source code. It will, of course, vary between compilers, but this is what clang generates: $ cat static.c _Static_assert(0, "example assert failed"); $ cc static.c static.c:1:1: error: static_assert failed "example assert failed" _Static_assert(0, "example assert failed"); ^ ~ 1 error generated. GCC 4.8 and later produce very similar output: $ gcc-4.8 static.c static.c:1:1: error: static assertion failed: "example assert failed" _Static_assert(0, "example assert failed"); ^ gcc 4.7 only provides the first line: $ gcc-4.7 static.c static.c:1:1: error: static assertion failed: "example assert failed" David