Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3794561ybb; Tue, 31 Mar 2020 12:07:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu+60u9UxgxkA3fzYPaZkNljZb+FM9EB0243uZMdS7mDDHSw+isPCLKcjP/wRbhk7z/PtJD X-Received: by 2002:a9d:554a:: with SMTP id h10mr13541827oti.344.1585681620336; Tue, 31 Mar 2020 12:07:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1585681620; cv=pass; d=google.com; s=arc-20160816; b=V39ZzoPuc7xb9LGhmprsAljwZzMY7BL2I8MnBPpfkr2hg/QgaGyR4hZ3AnQYN5LHWc jfRhSY2tEr6VlK/0QNCO8lMzed8TPu8z4EEnMzd0fDwNYroIj7R492vzvUEgHi2NGBro w8/Vgk10b8HfUPM6JmJ4yb28Z128OJwwwrf5b19zlPCGm37BW8X0al56Dwf60+zB/hVo N3lB9yNr6J6NTlYU7jXaJQaB/xoENz1/TCo3EB7RWVDt9ZHXOp5yXFl0sJW/u4SqJP4s ewBUCSEu8g/DHq61e2zqbwSHqOK8DcS+0rwLD/yKNFNOPz0p7tjDLwWXc4VoT5aRLamO Ikfw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=R0JScOtH5XtyaTyCrYE+dKW4zuYpRAiXCJ7KoVy2qvk=; b=f8qmLA/bmbAyJxXjIZ7w+sbqDzWnv3BT+PA2nmKh/0Fzca05zVYjYoVNS+2ModElGg VEFwE94t5Y3DIxkOZ4PpW75iH7Y8ZNM422HWhf0i/Liql/FvGwY/YUgQSQ5wtbhZe0HD lV/qALQo+69TQjtp9HBvp1kFPNE1s8xkEuIaDWOZqWSUTpx95/FBIZx/vyKE02OU5zLI viihzCZ1KGEoyqmZ5N8rqn9OlZnaOxB6wd4Sz7+1herk2BR3p6kG/biRJ1vs58VCLYX1 0A0T7jzAFaCkM3qWnsn72+zeZr2QqMBAruxCKIg2WH6MxGNGBYynbFQu+CUDuQ/cNE6z IqeA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@prevas.dk header.s=selector1 header.b=lfFDAzRs; arc=pass (i=1 spf=pass spfdomain=prevas.dk dkim=pass dkdomain=prevas.dk dmarc=pass fromdomain=prevas.dk); 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 c31si7619854otb.281.2020.03.31.12.06.46; Tue, 31 Mar 2020 12:07: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; dkim=pass header.i=@prevas.dk header.s=selector1 header.b=lfFDAzRs; arc=pass (i=1 spf=pass spfdomain=prevas.dk dkim=pass dkdomain=prevas.dk dmarc=pass fromdomain=prevas.dk); 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 S1727708AbgCaTFv (ORCPT + 99 others); Tue, 31 Mar 2020 15:05:51 -0400 Received: from mail-am6eur05on2105.outbound.protection.outlook.com ([40.107.22.105]:63328 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726315AbgCaTFv (ORCPT ); Tue, 31 Mar 2020 15:05:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jQrcLGIeOJNaeIq7q4jViR09HkKKxkfF1//m5wPFe0Uft/knqwDq2Sk39nUZr/DiUQlRqcJfbWvsNbuE/Cl8yPL53EYiF28SFh4JLrAHBTKY91wTvvh+ABBIUJtA9cz1TP5ZzexQGJiLaPuGeZD0JA8zcKILNodzy3Iw6KfsOE8w5sYq2HseM58WahNeca2G2Bb8AggLaaK815i1ljaq9prTq2UbWG0k9WsnIvZidFf4xH4OMt9BxrVWVmnVGh6M1vOs/kdqnSwHWVAfDJEbpGrRhNFbGusa9SUwpnZoHb3p8kLfdfuYAI85dOrq9k46+a6IOAkOpD0l1YYYqz9IqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R0JScOtH5XtyaTyCrYE+dKW4zuYpRAiXCJ7KoVy2qvk=; b=B9jBl69CPnKnEZ71Za0a8aorA2lduxYyLs/cTNoQn8ItbBxRxCQL+qmCYGne3pa+xg9BhP9r7BFmcsVnyJOxIVF6Z4USEyYJmRPbaZVweKRpn2qkV2ZcdMHxVsA28SCdLF7TsuDJLdG/o0GR7lPJPtCBTuiYN/a27kr+ARZO/yatRvAzJnMjayQa0H1exbWGpufIjNOH+XI62Z8brmj4gxVtxCWed9utQ1UUnr3IufCRknTmLkToWZ7V8Hg5AmbgR3p+4Z/GN50Lnfk1XzBFdYqyGLvm7MxkR+kloxeS++MO5BnlCA+EynFeoiyZ2cgQFxF8tq+D29gtDVDMiVm99g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R0JScOtH5XtyaTyCrYE+dKW4zuYpRAiXCJ7KoVy2qvk=; b=lfFDAzRsqeBWPW3m5zm+CSxoL6EbghtXpwJEo2wosTe5tlOoIfTJEuju6MMuUPj+hTTSps1eR2oRCG3lFHuk+DKm3YrY63Na700bAUmi9Rcnty+owYqxmiMpXQx8cMHemm5NIYCzPdf1R77R8dhBQF0oAclj4Y9rnJf9uteWezo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rasmus.villemoes@prevas.dk; Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (20.178.126.85) by VI1PR10MB1837.EURPRD10.PROD.OUTLOOK.COM (10.165.195.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Tue, 31 Mar 2020 19:05:47 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::e58f:1097:b71d:32c7%5]) with mapi id 15.20.2856.019; Tue, 31 Mar 2020 19:05:47 +0000 Subject: Re: [PATCH] compiler.h: fix error in BUILD_BUG_ON() reporting To: Joe Perches , Vegard Nossum , Andrew Morton Cc: linux-kernel@vger.kernel.org, Daniel Santos , Rasmus Villemoes , Masahiro Yamada , Ian Abbott References: <20200331112637.25047-1-vegard.nossum@oracle.com> <123d3606-cebf-4261-4b04-7d53d1fcdb07@prevas.dk> From: Rasmus Villemoes Message-ID: <27c2c661-43f2-1297-cc64-9ed3a7c10e26@prevas.dk> Date: Tue, 31 Mar 2020 21:05:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM6P194CA0056.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::33) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.149] (5.186.116.45) by AM6P194CA0056.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20 via Frontend Transport; Tue, 31 Mar 2020 19:05:46 +0000 X-Originating-IP: [5.186.116.45] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64c3f314-83e7-4d03-4453-08d7d5a68549 X-MS-TrafficTypeDiagnostic: VI1PR10MB1837: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0359162B6D X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(39850400004)(136003)(396003)(366004)(376002)(346002)(16576012)(5660300002)(36756003)(4744005)(4326008)(8676002)(2906002)(52116002)(8976002)(6486002)(81156014)(8936002)(81166006)(110136005)(86362001)(16526019)(54906003)(316002)(31696002)(26005)(186003)(66476007)(66946007)(31686004)(2616005)(66556008)(478600001)(956004)(44832011);DIR:OUT;SFP:1102; Received-SPF: None (protection.outlook.com: prevas.dk does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lnHsmnXrZvUbD6RnMFD9AgacYaAqXS68vdFfAWsNsfxohw9I8kewbgh4AbGMOybGNgANEW3rHj/QSm9Bfytpz+WAMH5LySQYgg9k/YT+r5B55CRmV7mk4I719j+qF12uF6rnEAwYlOf/GD60oTlPTZrXxtTrXrm9U7AJVl6+tGkc3RikZzOz4gfHnsEUUeBj3jdrYuRVfWU0i40nmw3Lrgm3LdhTg0UVBUu4ZZ2ISPzZ1gjR0amXGgh4BnlQVu/OY03zy2bRrKbZkb4ZeTOLbC9RNW5oyImt6doTPiAabeXrSMjYiOXGawei+qi13pnRJNgvgMPVO90/GKeDtW3uQzyc4ToASfkx+EAyqsRc5zPpH7Cspwhn9JXLG3CuOJVY9iRBqMYxL/EaUmPskgogHFhurM/I/cnCX3JfUplHQx198b2Pk2ES7zruLRPz4Osz X-MS-Exchange-AntiSpam-MessageData: rZ9a6FKOAtV83A+LVVjL6gja1p7l2nX2Ss995CH4TNwE3xytlmFOtdSBrJ9vinKyc9rPaaRXlRcSkFP+xocv4JInTyiXrdsUVi23WPkmDlWXz4RVT1B3yKMH5GwuzU+D7+n5+BP/cb4qlWSmMg1wAg== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 64c3f314-83e7-4d03-4453-08d7d5a68549 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2020 19:05:47.4662 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3Arule1uKP0rY2hd9TkXCkKNUcYGVgLpHbCRDKhbjhDvapbTOALGx0Z9mKtdo5OGnRH6H+coXHi9km9qXG4TuYg0mgQ/JPQ/PJAf6pjhllo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB1837 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/03/2020 21.00, Joe Perches wrote: > 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. Not only useful, necessary: They are used to create a unique identifier. Which turns out to not be unique when one uses __LINE__, causing the problem Vegard saw and fixes. Rasmus