From mboxrd@z Thu Jan 1 00:00:00 1970 From: "De Lara Guarch, Pablo" Subject: Re: [PATCH v2] examples/vhost: fix strict aliasing error on gcc 4.4.7 Date: Wed, 9 Dec 2015 10:52:35 +0000 Message-ID: References: <1449573835-149947-1-git-send-email-pablo.de.lara.guarch@intel.com> <1449653999-55759-1-git-send-email-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: "Xie, Huawei" , "dev@dpdk.org" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C04368D89 for ; Wed, 9 Dec 2015 11:52:37 +0100 (CET) In-Reply-To: Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Huawei, > -----Original Message----- > From: Xie, Huawei > Sent: Wednesday, December 09, 2015 10:45 AM > To: De Lara Guarch, Pablo; dev@dpdk.org > Cc: yuanhan.liu@linux.intel.com > Subject: Re: [PATCH v2] examples/vhost: fix strict aliasing error on gcc = 4.4.7 >=20 > On 12/9/2015 5:40 PM, De Lara Guarch, Pablo wrote: > > From: "De Lara Guarch, Pablo" > > > > Fixes following error on gcc 4.4.7: > > > > make: Entering directory `/tmp/dpdk-tmp/examples/vhost' > > CC main.o > > cc1: warnings being treated as errors > > /tmp/dpdk-tmp/examples/vhost/main.c: In function 'new_device': > > /tmp/dpdk-tmp/x86_64-native-linuxapp-gcc/include/rte_ring.h:740: > error: > > dereferencing pointer 'mbuf.486' does break strict-aliasing rules > > /tmp/dpdk-tmp/examples/vhost/main.c:1503: note: initialized from here > > ... > > /tmp/dpdk-tmp/examples/vhost/main.c:1503: note: initialized from here > > /tmp/dpdk-tmp/x86_64-native-linuxapp-gcc/include/rte_ring.h:740: > error: > > dereferencing pointer '({anonymous})' does break strict-aliasing ru= les > > /tmp/dpdk-tmp/examples/vhost/main.c:1804: note: initialized from here > > make[1]: *** [main.o] Error 1 > > > > Fixes: d19533e8 ("examples/vhost: copy old vhost example") > > > > Reported-by: Qian Xu > > Signed-off-by: Pablo de Lara > Acked-by: Huawei Xie >=20 I am going to send a v3 for this patch, removing the other casting that Bru= ce mentioned. I will pre-ack it, unless you have any concerns. Thanks, Pablo