Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-17 Thread Borislav Petkov
On Thu, Nov 15, 2012 at 01:44:45PM -0600, Daniel Santos wrote: > Yeah, I agree. Also, with the complexity, I think a few more comments > can be helpful in compiler.h to clarify what these macros are for more > specifically. >From what I've read so far the comments are fine but if you want to be

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-17 Thread Borislav Petkov
On Thu, Nov 15, 2012 at 01:44:45PM -0600, Daniel Santos wrote: Yeah, I agree. Also, with the complexity, I think a few more comments can be helpful in compiler.h to clarify what these macros are for more specifically. From what I've read so far the comments are fine but if you want to be more

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-15 Thread Daniel Santos
On 11/15/2012 09:08 AM, Borislav Petkov wrote: > On Tue, Nov 13, 2012 at 04:13:40PM -0600, danielfsan...@att.net wrote: >> 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

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-15 Thread Borislav Petkov
On Tue, Nov 13, 2012 at 04:13:40PM -0600, danielfsan...@att.net wrote: > 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

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-15 Thread Borislav Petkov
On Tue, Nov 13, 2012 at 04:13:40PM -0600, danielfsan...@att.net wrote: 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

Re: [PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-15 Thread Daniel Santos
On 11/15/2012 09:08 AM, Borislav Petkov wrote: On Tue, Nov 13, 2012 at 04:13:40PM -0600, danielfsan...@att.net wrote: 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

[PATCH v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-13 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 v5 8/9] compiler.h, bug.h: Prevent double error messages with BUILD_BUG{,_ON}

2012-11-13 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