* [Qemu-devel] [PATCH, RFC] gcc -Wundef, TCG bug
@ 2008-08-31 10:39 Blue Swirl
0 siblings, 0 replies; only message in thread
From: Blue Swirl @ 2008-08-31 10:39 UTC (permalink / raw)
To: qemu-devel, Fabrice Bellard, Paul Brook
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
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
case:
/* QEMU specific */
#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
DEF2(debug_insn_start, 0, 0, 2, 0)
#else
DEF2(debug_insn_start, 0, 0, 1, 0)
#endif
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 #2: wundef.diff --]
[-- Type: plain/text, Size: 1221 bytes --]
[-- Attachment #3: fix_wundef.diff --]
[-- Type: plain/text, Size: 16825 bytes --]
[-- Attachment #4: fix_wundef_tcg.diff --]
[-- Type: plain/text, Size: 801 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-31 11:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-31 10:39 [Qemu-devel] [PATCH, RFC] gcc -Wundef, TCG bug Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).