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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel