grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lists and aliasing (Re: Freeze on 27 February)


From: Lennart Sorensen
Subject: Re: Lists and aliasing (Re: Freeze on 27 February)
Date: Wed, 22 Feb 2012 13:28:06 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Feb 22, 2012 at 01:01:41PM -0500, Lennart Sorensen wrote:
> gcc 4.6 on the other hand now seems to compile with -Werror enabled.

Oh the feature for doing multiple #pragma statements throughout the code
is new in gcc 4.6.  It can't be done in earlier versions.  In older
versions whatever you say last applies to the whole file.

Perhaps a slightly ugly solution could solve it by having a #if that
checks that gcc is 4.6 or higher around the #pragma that reenables
the warning.

ie:

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic error "-Wunsafe-loop-optimizations"
#endif

At least this way you get to have the warning for most of the code on
newer gcc versions, but don't break older gcc versions that are still
in common use.

-- 
Len Sorensen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]