The problem of adapting the MSVC++ code for C++Builder- __declspec(align(n))
I have a huge issue of adapting the code into C++Builder.
What is the equivalent in C++Builder for __declspec (align (n))? I do not mean the #pragma pack ([show] | [push | pop] [, identifier], n)
. I need something for the macro.
I have a problem with adopt a code below (especially for __declspec(align(n))
):
#elif defined(_MSC_VER)
#define LJ_NORET __declspec(noreturn)
#define LJ_ALIGN(n) __declspec(align(n))
#define LJ_INLINE __inline
#define LJ_AINLINE __forceinline
#define LJ_NOINLINE __declspec(noinline)
#if defined(_M_IX86)
#define LJ_FASTCALL __fastcall
#endif
static LJ_AINLINE uint32_t lj_开发者_StackOverflowffs(uint32_t x)
{
uint32_t r; _BitScanForward(&r, x); return r;
}
static LJ_AINLINE uint32_t lj_fls(uint32_t x)
{
uint32_t r; _BitScanReverse(&r, x); return r;
}
#define lj_bswap(x) (_byteswap_ulong((x)))
#else
The [[align]] attribute is not yet implemented in C++Builder. I'm not sure where this is in the priorities list for C++0x support.
精彩评论