Re: Disable -Werror when error attribute generates warnings

2010-01-03 Thread Colin Watson
On Sun, Jan 03, 2010 at 05:46:14PM +0100, Robert Millan wrote: > On Sat, Jan 02, 2010 at 03:37:38PM +, Colin Watson wrote: > > 2010-01-02 Colin Watson > > > > * include/grub/misc.h (GNUC_PREREQ): New macro. > > (ATTRIBUTE_ERROR): New macro. > > * include/grub/list.h (gru

Re: Disable -Werror when error attribute generates warnings

2010-01-03 Thread Colin Watson
On Sat, Jan 02, 2010 at 07:21:21PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Colin Watson wrote: > > Instead of this, why not only use the attribute if it's available? I > > couldn't find an entry about it in GCC's human-readable change > > summaries, but support was committed on 2007-

Re: Disable -Werror when error attribute generates warnings

2010-01-03 Thread Robert Millan
On Sat, Jan 02, 2010 at 07:21:21PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > > Instead of this, why not only use the attribute if it's available? I > > couldn't find an entry about it in GCC's human-readable change > > summaries, but support was committed on 2007-09-23 so I think it's

Re: Disable -Werror when error attribute generates warnings

2010-01-03 Thread Robert Millan
On Sat, Jan 02, 2010 at 03:37:38PM +, Colin Watson wrote: > > 2010-01-02 Colin Watson > > * include/grub/misc.h (GNUC_PREREQ): New macro. > (ATTRIBUTE_ERROR): New macro. > * include/grub/list.h (grub_bad_type_cast_real): Use > ATTRIBUTE_ERROR. Looks fine. Pl

Re: Disable -Werror when error attribute generates warnings

2010-01-02 Thread Vladimir 'φ-coder/phcoder' Serbinenko
> =20 >> With an older version of gcc that does not understand the error =20 >> attribute, gcc generates warnings when compiling files that include =20 >> include/grub/list.h. Since TARGET_CFLAGS contains -Werror by default,= =20 >> the build of modules fails. >> >> The following patch checks wh

Re: Disable -Werror when error attribute generates warnings

2010-01-02 Thread Grégoire Sutre
Colin Watson wrote: Instead of this, why not only use the attribute if it's available? I couldn't find an entry about it in GCC's human-readable change summaries, but support was committed on 2007-09-23 so I think it's available from GCC 4.3. I use this GNUC_PREREQ approach in other projects an

Re: Disable -Werror when error attribute generates warnings

2010-01-02 Thread Colin Watson
On Sat, Jan 02, 2010 at 01:58:20PM +0100, Grégoire Sutre wrote: > With an older version of gcc that does not understand the error > attribute, gcc generates warnings when compiling files that include > include/grub/list.h. Since TARGET_CFLAGS contains -Werror by default, > the build of modul