Unable to Compile the following code snippet :------------------------------------------------------------------------------#include <stdio.h>#define FALSE 0#define TRUE !FALSEtypedef unsigned int unsigned32_T;typedef unsigned short int unsigned16_T;typedef unsigned32_T u32_fixed_point_T;typedef unsigned16_T u18pm2_T; /* bbbbbbbbbbbbbbbb00.0 */#define BPP_u18pm2_T -2#define SIGNED_u18pm2_T FALSE#define Init_Fixed_Point(value, to_type) \( \ ( (BPP_##to_type) >= 0U ) ? \ ( ( (value) >= 0U ) ? \ ( (SIGNED_##to_type) ? \ ( ( (value) >= ( ( ( (u32_fixed_point_T)1U << ( 8U*sizeof(to_type)-1U ) ) - 1.0 ) / ( (u32_fixed_point_T)1U << (BPP_##to_type) ) ) ) ? \ /* return max. signed counts on overflow for signed type */ \ ( (to_type)( ( (to_type)1U << ( 8U*sizeof(to_type)-1U ) ) - 1 ) ): \ ( (to_type)( ( (value) * ( (u32_fixed_point_T)1U << (BPP_##to_type) ) ) + 0.5 ) ) \ ): \ ( ( (value) >= ( ( (to_type)0xFFFFFFFFU + 0.0 ) / ( (u32_fixed_point_T)1U << (BPP_##to_type) ) ) ) ? \ /* "+ 0.0" in above expression to force decimal arithmetic to get engineering limit */ \ /* return max. unsigned counts on overflow for unsigned type */ \ ( (to_type)0xFFFFFFFFU ): \ ( (to_type)( ( (value) * ( (u32_fixed_point_T)1 << (BPP_##to_type) ) ) + 0.5 ) ) \ ) \ ): \ ( (SIGNED_##to_type) ? \ ( ( (value) <= -( ( ( (u32_fixed_point_T)1U << ( 8U*sizeof(to_type)-1U ) ) + 0.0 ) / ( (u32_fixed_point_T)1U << (BPP_##to_type) ) ) )? \ /* "+ 0.0" in above expression to force decimal arithmetic to get engineering limit */ \ /* return min. signed counts on underflow for signed type */ \ ( (to_type)( -( (to_type)1U << ( 8U*sizeof(to_type)-1U ) ) ) ): \ ( (to_type)( (double)(value)* ( (u32_fixed_point_T)1U << (BPP_##to_type) ) - 0.5) ) \ ): \ /* return min. unsigned counts on underflow for unsigned type */ \ ((to_type)0U) \ ) \ ): \ ( ( (value) >= 0U ) ? \ ( (SIGNED_##to_type) ? \ ( ( (value) >= ( ( ( (u32_fixed_point_T)1U << ( 8U*sizeof(to_type)-1U ) ) - 1U ) * ( (u32_fixed_point_T)1U << ( -(BPP_##to_type) ) ) ) ) ? \ /* return max. signed counts on overflow for signed type */ \ ( (to_type)( ( (to_type)1U << ( 8U*sizeof(to_type)-1U ) ) - 1U ) ): \ ( (to_type)( ( ( (value) * ( 0x00010000U >> ( -(BPP_##to_type) ) ) ) + 32768U ) / 65536U ) ) \ ): \ ( ( (value) >= ( ( (to_type)0xFFFFFFFFU ) * ( (u32_fixed_point_T)1U << ( -(BPP_##to_type) ) ) ) ) ? \ /* return max. unsigned counts on overflow for unsigned type */ \ ( (to_type)0xFFFFFFFFU ): \ ( (to_type)( /* ( ( (u32_fixed_point_T)(value) * ( 0x00010000U >> ( -(BPP_##to_type) ) ) ) + 32768 ) */ 1U /* / 65536 */ ) ) \ ) \ ): \ ( (SIGNED_##to_type) ? \ ( ( ( (signed int)( ( (value) / ( ( 1U << ( -(BPP_##to_type) ) ) + 0.0 ) ) - ( -( 1U << ( 8U*sizeof(to_type)-1U ) ) ) ) ) <= 0U ) ? \ /* return min. signed counts on underflow for signed type */ \ ( (to_type)( -( (to_type)1U << ( 8U*sizeof(to_type)-1U ) ) ) ): \ ( (to_type)( ( ( (value) * ( 0x00010000U >> ( -(BPP_##to_type) ) ) ) - 32768U ) / 65536U ) ) \ ): \ /* return min. unsigned counts on underflow for unsigned type */ \ ((to_type)0U) \ ) \ ) \)#define MAX_T_DELTA Init_Fixed_Point( 262140U, u18pm2_T )int volatile test_data = 5;void main(void){ printf("Hello World\n"); if (test_data > MAX_T_DELTA) { printf("Data Error\n"); }}--------------------------------------------------------
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...