Re: [PATCH v2 07/10] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-05 Thread Daniel Santos
On 10/05/2012 03:59 PM, Josh Triplett wrote: > On Fri, Oct 05, 2012 at 02:42:46PM -0500, danielfsan...@att.net wrote: >> --- a/include/linux/compiler.h >> +++ b/include/linux/compiler.h >> @@ -296,6 +296,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, >> int val, int expect); >>

Re: [PATCH v2 07/10] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-05 Thread Josh Triplett
On Fri, Oct 05, 2012 at 02:42:46PM -0500, danielfsan...@att.net wrote: > --- a/include/linux/compiler.h > +++ b/include/linux/compiler.h > @@ -296,6 +296,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, > int val, int expect); > #endif > #ifndef __compiletime_error > # define

[PATCH v2 07/10] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-05 Thread danielfsantos
Prior to the introduction of __attribute__((error("msg"))) in gcc 4.3, creating compile-time errors required a little trickery. BUILD_BUG{,_ON} uses this attribute when available to generate compile-time errors, but also uses the negative-sized array trick for older compilers, resulting in two

[PATCH v2 07/10] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-05 Thread danielfsantos
Prior to the introduction of __attribute__((error(msg))) in gcc 4.3, creating compile-time errors required a little trickery. BUILD_BUG{,_ON} uses this attribute when available to generate compile-time errors, but also uses the negative-sized array trick for older compilers, resulting in two error

Re: [PATCH v2 07/10] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-05 Thread Josh Triplett
On Fri, Oct 05, 2012 at 02:42:46PM -0500, danielfsan...@att.net wrote: --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -296,6 +296,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); #endif #ifndef __compiletime_error # define

Re: [PATCH v2 07/10] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-10-05 Thread Daniel Santos
On 10/05/2012 03:59 PM, Josh Triplett wrote: On Fri, Oct 05, 2012 at 02:42:46PM -0500, danielfsan...@att.net wrote: --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -296,6 +296,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); #endif