Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-20 Thread Daniel Santos
On 11/17/2012 08:38 AM, Borislav Petkov wrote: > On Thu, Nov 15, 2012 at 01:11:15PM -0600, Daniel Santos wrote: >> Ah yes. I did notice that at one point, but I think it slipped >> my mind. Also, the kernel has introduced me to the usage of the >> !! construct, of which I'm well versed in its affec

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-17 Thread Borislav Petkov
On Thu, Nov 15, 2012 at 01:11:15PM -0600, Daniel Santos wrote: > Ah yes. I did notice that at one point, but I think it slipped > my mind. Also, the kernel has introduced me to the usage of the > !! construct, of which I'm well versed in its affects in various > situations and how gcc's optimizer e

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-15 Thread Daniel Santos
On 11/15/2012 09:07 AM, Borislav Petkov wrote: > On Tue, Nov 13, 2012 at 04:13:38PM -0600, danielfsan...@att.net wrote: >> When calling BUILD_BUG_ON in an optimized build using gcc 4.3 and later, >> the condition will be evaulated twice, possibily with side-effects. >> This patch eliminates that er

Re: [PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-15 Thread Borislav Petkov
On Tue, Nov 13, 2012 at 04:13:38PM -0600, danielfsan...@att.net wrote: > When calling BUILD_BUG_ON in an optimized build using gcc 4.3 and later, > the condition will be evaulated twice, possibily with side-effects. > This patch eliminates that error. > > Signed-off-by: Daniel Santos > --- > inc

[PATCH v5 6/9] bug.h: Prevent double evaulation of in BUILD_BUG_ON

2012-11-13 Thread danielfsantos
When calling BUILD_BUG_ON in an optimized build using gcc 4.3 and later, the condition will be evaulated twice, possibily with side-effects. This patch eliminates that error. Signed-off-by: Daniel Santos --- include/linux/bug.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff