|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [RfC PATCH 2/2] qdev/prop: convert pci.c to helper macros. |
Date: | Fri, 31 Jul 2009 17:42:23 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 |
Hi,
(long)(&(_prop)->type -&((_struct *)0)->_field)) \
This seems to be free of gcc extensions and gives more or less sane errors like: foo.c:26: error: invalid operands to binary - (have ‘long long int *’ and ‘int *’)
The "better error message" bit works. Nice idea. Incremental patch attached.
cheers, Gerd
0001-better-type-check.patch
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |