Re: [ovs-dev] [PATCH 2/5] lib/cmap, lib/classifier: Avoid aliasing pointers.

2014-07-19 Thread Ben Pfaff
On Sat, Jul 19, 2014 at 11:33:36AM +0300, Jarno Rajahalme wrote: > > > Sent from my iPhone > > > On Jul 19, 2014, at 10:03 AM, Ben Pfaff wrote: > > > >> On Fri, Jul 18, 2014 at 11:33:38PM -0700, Ben Pfaff wrote: > >>> On Fri, Jul 18, 2014 at 09:05:49PM -0700, Jarno Rajahalme wrote: > >>> Older

Re: [ovs-dev] [PATCH 2/5] lib/cmap, lib/classifier: Avoid aliasing pointers.

2014-07-19 Thread Ben Pfaff
I didn't look at the classifier yet. Maybe it can't work the same way. On Jul 19, 2014 1:33 AM, "Jarno Rajahalme" wrote: > > > Sent from my iPhone > > > On Jul 19, 2014, at 10:03 AM, Ben Pfaff wrote: > > > >> On Fri, Jul 18, 2014 at 11:33:38PM -0700, Ben Pfaff wrote: > >>> On Fri, Jul 18, 2014 a

Re: [ovs-dev] [PATCH 2/5] lib/cmap, lib/classifier: Avoid aliasing pointers.

2014-07-19 Thread Jarno Rajahalme
Sent from my iPhone > On Jul 19, 2014, at 10:03 AM, Ben Pfaff wrote: > >> On Fri, Jul 18, 2014 at 11:33:38PM -0700, Ben Pfaff wrote: >>> On Fri, Jul 18, 2014 at 09:05:49PM -0700, Jarno Rajahalme wrote: >>> Older GCC (e.g. 4.1.2) did not like the pointer casts used for >>> initializing the iter

Re: [ovs-dev] [PATCH 2/5] lib/cmap, lib/classifier: Avoid aliasing pointers.

2014-07-19 Thread Ben Pfaff
On Fri, Jul 18, 2014 at 11:33:38PM -0700, Ben Pfaff wrote: > On Fri, Jul 18, 2014 at 09:05:49PM -0700, Jarno Rajahalme wrote: > > Older GCC (e.g. 4.1.2) did not like the pointer casts used for > > initializing the iteration cursors. This patch changes the code to > > avoid the void casts for GCC,

Re: [ovs-dev] [PATCH 2/5] lib/cmap, lib/classifier: Avoid aliasing pointers.

2014-07-18 Thread Ben Pfaff
On Fri, Jul 18, 2014 at 09:05:49PM -0700, Jarno Rajahalme wrote: > Older GCC (e.g. 4.1.2) did not like the pointer casts used for > initializing the iteration cursors. This patch changes the code to > avoid the void casts for GCC, and makes the classifier interface more > similar to that of the cm

[ovs-dev] [PATCH 2/5] lib/cmap, lib/classifier: Avoid aliasing pointers.

2014-07-18 Thread Jarno Rajahalme
Older GCC (e.g. 4.1.2) did not like the pointer casts used for initializing the iteration cursors. This patch changes the code to avoid the void casts for GCC, and makes the classifier interface more similar to that of the cmap. These changes make the code work with GCC 4.1.2 strict aliasing rule