[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Compile errors with gcc 4.8
On Thu, 7 Feb 2013, Andrew Cooper wrote: On 06/02/2013 20:37, M A Young wrote:There are two types of problem, the first is from xen/common/compat/memory.c where the error is memory.c: In function 'compat_memory_op': /builddir/build/BUILD/xen-4.2.1/xen/include/public/arch-x86/xen.h:35:33: error: typedef '__guest_handle_const_compat_memory_exchange_t' locally defined but not used [-Werror=unused-local-typedefs] typedef struct { type *p; } __guest_handle_ ## name ^ /builddir/build/BUILD/xen-4.2.1/xen/include/public/arch-x86/xen.h:43:5: note: in expansion of macro '___DEFINE_XEN_GUEST_HANDLE' ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type) ^ /builddir/build/BUILD/xen-4.2.1/xen/include/public/arch-x86/xen.h:44:41: note: in expansion of macro '__DEFINE_XEN_GUEST_HANDLE' #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name) ^ memory.c:261:13: note: in expansion of macro 'DEFINE_XEN_GUEST_HANDLE' DEFINE_XEN_GUEST_HANDLE(compat_memory_exchange_t); ^ so we are defining something that isn't used.But it is used, by guest_handle_cast, albeit through several layers of macros. I would tentativly object to the use of "__attribute__((unused));" to work around what appears to be a gcc bug. If 4.8 support is desperately wanted, then a better solution would be to specify -Wno-unused-local-typedefs to disable the buggy feature. It looked to me as if the DEFINE macro does two typedefs and the code only uses the first, so gcc 4.8 was correct in its objections. The suggested workaround of using -Wno-unused-local-typedefs isn't very portible as earlier versions of gcc don't recognize it. Michael Young _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |