VirtualBox

Changeset 108290 in vbox for trunk/include


Ignore:
Timestamp:
Feb 19, 2025 1:07:27 PM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167633
Message:

iprt/cdefs.h,VMM/IEM: Added RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_BEGIN/END to cdefs.h for working around warning/error in IEMInline.h with recent gcc versions (13.3 and others). jiraref:VBP-1531

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r107775 r108290  
    11581158# define RT_GCC_NO_WARN_CONVERSION_BEGIN
    11591159# define RT_GCC_NO_WARN_CONVERSION_END
     1160#endif
     1161
     1162/** @def RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_BEGIN
     1163 * Used to start a block of code where the compiler (gcc, ++) should not warn
     1164 * about unused inline function prototypes.  (This lead the compiler to
     1165 * ignore more than just inline functions.) */
     1166#if RT_GNUC_PREREQ(4, 6)
     1167# define RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_BEGIN \
     1168   _Pragma("GCC diagnostic push") \
     1169   _Pragma("GCC diagnostic ignored \"-Wunused-function\"")
     1170/** @def RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_END
     1171 * Paired with RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_BEGIN */
     1172# define RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_END \
     1173   _Pragma("GCC diagnostic pop")
     1174#else
     1175# define RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_BEGIN
     1176# define RT_NO_WARN_UNUSED_INLINE_PROTOTYPE_END
    11601177#endif
    11611178
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette