VirtualBox

Ignore:
Timestamp:
Dec 2, 2015 10:17:04 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
104474
Message:

iprt/cdefs.h: Added RT_COMPILER_SUPPORTS_VA_ARGS, RT_BF_ASSERT_COMPILE_CHECKS, RT_EXPAND, RT_UNPACK_CALL, RT_UNPACK_ARGS, and RT_COUNT_VA_ARGS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTAssertCompile.cpp

    r57358 r58960  
    151151    AssertCompileMembersSameSizeAndOffset(STRUCT1, u64, STRUCT2, u64);
    152152
     153    /*
     154     * Check some cdefs.h macros while where here, we'll be using
     155     * AssertCompile so it's kind of related.
     156     */
     157#ifdef RT_COMPILER_SUPPORTS_VA_ARGS
     158    AssertCompile(RT_COUNT_VA_ARGS() == 0);
     159    AssertCompile(RT_COUNT_VA_ARGS(asdf) == 1);
     160    AssertCompile(RT_COUNT_VA_ARGS(yyyy) == 1);
     161    AssertCompile(RT_COUNT_VA_ARGS(_) == 1);
     162    AssertCompile(RT_COUNT_VA_ARGS(1, 2, 3, 4, 5, 6, 7, 8, 9, 0) == 10);
     163#endif
    153164    return 0;
    154165}
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