VirtualBox

Changeset 69010 in vbox


Ignore:
Timestamp:
Oct 9, 2017 10:11:03 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118279
Message:

iprt/cdefs.h: Introduced RT_FALL_THROUGH() and the alias RT_FALL_THRU() for telling the compiler that we intended to fall thru to the next case in a switch. It's unfortunately necessary because the GCC preprocessor doesn't pass the information along.

File:
1 edited

Legend:

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

    r68572 r69010  
    11081108# define RT_THROW(type)
    11091109#endif
     1110
     1111
     1112/** @def RT_FALL_THROUGH
     1113 * Tell the compiler that we're falling through to the next case in a switch.
     1114 * @sa RT_FALL_THRU  */
     1115#if RT_GNUC_PREREQ(7, 0)
     1116# define RT_FALL_THROUGH()      __attribute__((fallthrough))
     1117#else
     1118# define RT_FALL_THROUGH()      (void)0
     1119#endif
     1120/** @def RT_FALL_THRU
     1121 * Tell the compiler that we're falling thru to the next case in a switch.
     1122 * @sa RT_FALL_THROUGH */
     1123#define RT_FALL_THRU()          RT_FALL_THROUGH()
     1124
    11101125
    11111126/** @def RT_IPRT_FORMAT_ATTR
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