Hi,

This was encountered on FreeBSD. I believe, starting with LLVM 10, a
warning/error is now produced as such (reported to me; I do not have
the machine in question on hand):

/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp:388:25:
error:
      exception specification in declaration does not match previous
declaration
IEM_DECL_IMPL_DEF(void, iemAImpl_add_u64,(uint64_t *puDst, uint64_t uSrc...
                        ^
/export/wrkdir/i386/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.34/src/VBox/VMM/include/IEMInternal.h:1146:18:
note:
      previous declaration is here
FNIEMAIMPLBINU64 iemAImpl_add_u64, iemAImpl_add_u64_locked;

Examination reveals that the __nothrow__ attribute is being applied to
the definition but not the declaration, which is the source of the
above error. Patch attached and available at
https://people.freebsd.org/~kevans/vbox/nothrow.diff adds __nothrow__
to the declaration as well to appease clang.

I suspect this is a de-minimus patch and licensing is not an issue,
but in case it's explicitly needed: this may be MIT licensed.

Thanks,

Kyle Evans
Index: src/VBox/VMM/include/IEMInternal.h
===================================================================
--- src/VBox/VMM/include/IEMInternal.h	(revision 83509)
+++ src/VBox/VMM/include/IEMInternal.h	(working copy)
@@ -956,7 +956,7 @@
 
 #if defined(__GNUC__) && defined(RT_ARCH_X86)
 # define IEM_DECL_IMPL_TYPE(a_RetType, a_Name, a_ArgList) \
-    __attribute__((__fastcall__)) a_RetType (a_Name) a_ArgList
+    __attribute__((__fastcall__, __nothrow__)) a_RetType (a_Name) a_ArgList
 # define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) \
     __attribute__((__fastcall__, __nothrow__)) a_RetType a_Name a_ArgList
 
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to