Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3790745ybb; Tue, 31 Mar 2020 12:03:00 -0700 (PDT) X-Google-Smtp-Source: APiQypIhCYPwDalWYKzPyr4FSwbQ5wMtxuY4NDvzbl6f0ZVzJP3oU7r/zmO4XwNPFGBYWBBVF83o X-Received: by 2002:aca:55ce:: with SMTP id j197mr263169oib.84.1585681380369; Tue, 31 Mar 2020 12:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585681380; cv=none; d=google.com; s=arc-20160816; b=X8T24MoyUhTjFi96iWf9SG2TWXeWa+tj6pdR2BM1rlAPUGaO2gYIrGtPsgG1M0YqIH iWYi8dSTs4Wurww/gn02VtNKWgczPMnr/bHQutA9nfk5j1F/3ft2oHohpBlrLrO/rCN8 nHbyEdn28mIW9rmxxJfy8QP+O4SxSLZ1kwfo08mSYZcJ9M28VSPcHDww3AV2FIjcTLMz XNaKYEPvuwnsOwAR6oN9PV3s7EEw4+m47HK5HRjNl2DxTmJ82Txq2DLVsuv+lBu/KV73 0ySfZHDUmlq103QshL5XdFo88A4kJK+n+C1h1r3BLFBpruyOSzpqA0qnxlPRU4w+pEhe H7gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=LLRz75STyijW5hzIKwe2sTKr9xz/udIwSfefwcdAyGE=; b=ADzM9asEuDTE27ozorwYjJDGWpTJheq41TLT9JZ5qeDg0is0VT2JsjlkNuBAd2y3pV 90XO8dHPgu0x7iUwE3O1vGL5b8dTY51dL8wcahS2J78hzQf/iTVgw8hD0NBBGZPB6Phx sNgW39oQdRaqHiPHtJiueadzHtgCVGOf/YWhbmIs2NynNbMtfDSQd6UCvNp+zl0qMn4y f4LwfJjmmVivRyj0GDBX5lIPMjH9iV6wStGA5n0iK8WMtMh4s4b6m2SG+XXsVwFu04DZ ZV41zbw8QT3nl774g/k7/uExsTZCWn177V3w9T0Q9n/9VzDozZIWsZ7n1Jgr8Ko3IdxH aDEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w79si7014588oif.21.2020.03.31.12.02.47; Tue, 31 Mar 2020 12:03:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727749AbgCaTCX (ORCPT + 99 others); Tue, 31 Mar 2020 15:02:23 -0400 Received: from smtprelay0162.hostedemail.com ([216.40.44.162]:33844 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726295AbgCaTCX (ORCPT ); Tue, 31 Mar 2020 15:02:23 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id CDAFE182CF668; Tue, 31 Mar 2020 19:02:21 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2892:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3874:4321:5007:10004:10400:10848:11026:11232:11658:11914:12043:12297:12438:12740:12760:12895:13069:13311:13357:13439:14659:21080:21451:21627:30025:30054:30075:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: stamp41_31887f240cb3a X-Filterd-Recvd-Size: 1891 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Tue, 31 Mar 2020 19:02:20 +0000 (UTC) Message-ID: Subject: Re: [PATCH] compiler.h: fix error in BUILD_BUG_ON() reporting From: Joe Perches To: Rasmus Villemoes , Vegard Nossum , Andrew Morton Cc: linux-kernel@vger.kernel.org, Daniel Santos , Rasmus Villemoes , Masahiro Yamada , Ian Abbott Date: Tue, 31 Mar 2020 12:00:25 -0700 In-Reply-To: <123d3606-cebf-4261-4b04-7d53d1fcdb07@prevas.dk> References: <20200331112637.25047-1-vegard.nossum@oracle.com> <123d3606-cebf-4261-4b04-7d53d1fcdb07@prevas.dk> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-03-31 at 20:56 +0200, Rasmus Villemoes wrote: > On 31/03/2020 20.20, Joe Perches wrote: > > On Tue, 2020-03-31 at 13:26 +0200, Vegard Nossum wrote: > > > #define compiletime_assert(condition, msg) \ > > > - _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > > > + _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) > > > > This might be better using something like __LINE__ ## _ ## __COUNTER__ > > > > as line # is somewhat useful to identify the specific assert in a file. > > > > Eh, if the assert fires, doesn't the compiler's diagnostics already > contain all kinds of location information? I presume if that were enough, neither __LINE__ nor __COUNTER__ would be useful.