Wine: Use GCC's -Wlogical-op if supported.
Gerald Pfeifer
gerald at pfeifer.com
Mon Sep 20 18:39:03 CDT 2010
On Mon, 20 Sep 2010, Alexandre Julliard wrote:
>> In the past this has found a dozen or two real issues and lead to some
>> simplifications. Now the tree is clean in that regard, so we can make
>> this a default.
> I still see a ton of warnings here (gcc 4.4.5), mostly because of the
> glibc string macros.
Hmm, I see. Still, this is really useful to have. How about the patch
below as an alternative? Additional platforms can add this when/if they
want.
Gerald
ChangeLog:
Use GCC's -Wlogical-op if supported (restricted to FreeBSD for now).
diff --git a/configure.ac b/configure.ac
index e3220ef..21a06b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1611,6 +1611,9 @@ then
WINE_TRY_CFLAGS([-fno-builtin],[AC_SUBST(BUILTINFLAG,"-fno-builtin")])
WINE_TRY_CFLAGS([-fno-strict-aliasing])
WINE_TRY_CFLAGS([-Wdeclaration-after-statement])
+ if test `uname -s` = "FreeBSD"; then
+ WINE_TRY_CFLAGS([-Wlogical-op])
+ fi
WINE_TRY_CFLAGS([-Wstrict-prototypes])
WINE_TRY_CFLAGS([-Wtype-limits])
WINE_TRY_CFLAGS([-Wwrite-strings])
--
1.7.2.2
More information about the wine-patches
mailing list