From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D046A0A0C; Mon, 28 Jun 2021 16:33:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FCF440692; Mon, 28 Jun 2021 16:33:19 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1DE7C4068A for ; Mon, 28 Jun 2021 16:33:18 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6733420B6C50; Mon, 28 Jun 2021 07:33:17 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6733420B6C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1624890797; bh=K8hB1pnYX1Xf50DA48ABhspbfmvJprcZIPJ0v4XlNVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lme/tCBlBUBOkFUfEnHFWX1Pq4YkCBH2qn0HhWHbqWzDEsnqX+ka7OWcikwY3Gd26 2mg3pwFTjkzM2bGaRUI4/VWq1LzgLPObjnOAAfXGtMaSAW9GrzdRpZh5nd/8D0j6H8 ol11Hf3zrw40SVbs1Byl6cRWw88xtuEqPxdzZm48= Date: Mon, 28 Jun 2021 07:33:17 -0700 From: Tyler Retzlaff To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com, dmitry.kozliuk@gmail.com, david.marchand@redhat.com Message-ID: <20210628143317.GC28256@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210623182657.GA24634@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <3277479.bKIgzLV6lZ@thomas> <20210624160228.GB22718@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <2661083.m9YJQ7Gqa3@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2661083.m9YJQ7Gqa3@thomas> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [RFC] toolchain specific macro expansion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Jun 24, 2021 at 06:29:20PM +0200, Thomas Monjalon wrote: > 24/06/2021 18:02, Tyler Retzlaff: > > On Thu, Jun 24, 2021 at 08:54:49AM +0200, Thomas Monjalon wrote: > > > 23/06/2021 20:26, Tyler Retzlaff: > > > > // lib/eal/gcc/rte_toolchain_common.h > > > > #define __rte_noreturn __attribute__((noreturn)) > > > > > > We should keep a macro in rte_common.h which triggers an explicit error > > > > i think that's relatively trivial to do. rte_common.h could after > > toolchain specific include do a simple test. > > > > #ifndef __rte_no_return > > #error no __rte_no_return defined for toolchain > > #endif > > No I was thinking of: > > /** Doxygen comment for the attribute below */ > #define __rte_no_return RTE_ATTR_NOT_SUPPORTED oh, didn't know about this. it sounds better. > > This way we have a documentation in a single place for the macro, > and compilation fails if it is not implemented for the toolchain. yes, i was thinking about this. i'm glad you suggested it because a signle source of documentation in rte_common.h would be better than having to maintain redundant copies.