gcc 4.8 gives the following error when building xen/common/compat/memory.c 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); ^ The error is harmless in this case so turn the check off. Signed-off-by: Michael Young --- xen-4.2.1/Config.mk.orig 2013-02-08 20:07:25.006716975 +0000 +++ xen-4.2.1/Config.mk 2013-02-08 20:13:52.184876582 +0000 @@ -166,6 +166,7 @@ $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) +$(call cc-option-add,CFLAGS,CC,-Wno-unused-local-typedefs) LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))