From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] mk: suppress error for reference of packed members Date: Wed, 25 Jan 2017 11:08:24 +0100 Message-ID: <1684540.y5zCPFlYWp@xps13> References: <20170124210419.14084-1-emmanuel.roullit@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Emmanuel Roullit Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id A1DF9108F for ; Wed, 25 Jan 2017 11:08:25 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id c206so21707049wme.0 for ; Wed, 25 Jan 2017 02:08:25 -0800 (PST) In-Reply-To: <20170124210419.14084-1-emmanuel.roullit@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-01-24 22:04, Emmanuel Roullit: > Found with clang build: > error: taking address of packed member 'mlock' of class or structure > 'rte_mem_config' may result in an unaligned pointer value > [-Werror,-Waddress-of-packed-member] > > Fixes: 29361d4c91ed ("mk: fix build with clang < 3.5") > Fixes: b2bb3a5daaac ("mk: stop on warning only in developer build") I think these references are not correct. The bug is due to a new version of clang, so no Fixes: tag is needed. You should put "clang 4" in the title. > Signed-off-by: Emmanuel Roullit > --- > > v2: > * Only apply compiler flag on clang >= 4.0 Please use --in-reply-to for grouping v2 patches with v1. > --- a/mk/toolchain/clang/rte.toolchain-compat.mk > +++ b/mk/toolchain/clang/rte.toolchain-compat.mk > +ifeq ($(shell test $(CLANG_MAJOR_VERSION)$(CLANG_MINOR_VERSION) -ge 40 && echo 1), 1) > + CC_PACKED_MEMBER_WERROR := true > +endif > --- a/mk/toolchain/clang/rte.vars.mk > +++ b/mk/toolchain/clang/rte.vars.mk > +ifeq ($(CC_PACKED_MEMBER_WERROR),true) > +WERROR_FLAGS += -Wno-address-of-packed-member > +endif So you are completely disabling the warning? Can we assume this warning is of no interest?