[Top][All Lists]

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

[Qemu-devel] [PATCH, RFC] gcc -Wundef, TCG bug

From: Blue Swirl
Subject: [Qemu-devel] [PATCH, RFC] gcc -Wundef, TCG bug
Date: Sun, 31 Aug 2008 13:39:18 +0300

The first patch enables gcc flag -Wundef, the second one fixes most
warnings caused by this. Nothing spectacular.

Now the third patch is more interesting. It looks like there is a real
bug in TCG, exposed by the new warnings. The following code in
tcg-opc.h depends on TARGET_LONG_BITS being defined, which is not the
/* QEMU specific */
DEF2(debug_insn_start, 0, 0, 2, 0)
DEF2(debug_insn_start, 0, 0, 1, 0)

Moreover, adding an #include "cpu.h" to get TARGET_LONG_BITS defined,
breaks dyngen targets because the prototypes in cpu.h conflict with
the generated code.

I propose to enable the gcc flag, even though it causes these warnings
with TCG code, just to remind us about the problem. The second patch
should be safe to apply. The third one should be applied only after
the tcg-opc.h change is judged safe and dyngen targets have been
converted to TCG.

Attachment: wundef.diff
Description: plain/text

Attachment: fix_wundef.diff
Description: plain/text

Attachment: fix_wundef_tcg.diff
Description: plain/text

reply via email to

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