stage3/datatype_functions.cc
changeset 517 889f4e577964
parent 490 29f6ab0bf954
child 556 af3e378e98f9
equal deleted inserted replaced
516:8591746fa134 517:889f4e577964
    88 /*******  TABLE 30: Functions of time data types        *******/
    88 /*******  TABLE 30: Functions of time data types        *******/
    89 /**************************************************************/
    89 /**************************************************************/
    90 /**************************************************************/
    90 /**************************************************************/
    91 /**************************************************************/
    91 /**************************************************************/
    92 
    92 
       
    93 /* NOTE: IEC 61131-3 v2 declares that using implicit operations ('+', '-', '*', '/') on ANYTIME data types is
       
    94  *       valid, but deprecated, suposedly meaning that they will be removed in the following version of the standard.
       
    95  *       However, the current draft version of IEC 61131-3 v3 still allows this use, and no longer declares these
       
    96  *       implicit operations as deprecated.
       
    97  *       Because of this, and although we are implementing v2 of the standard, we will no longer mark these 
       
    98  *       operations as deprecated.
       
    99  */
       
   100   #define ANYTIME_OPER_DEPRECATION_STATUS widen_entry::ok
       
   101 //#define ANYTIME_OPER_DEPRECATION_STATUS widen_entry::deprecated
       
   102 
    93 
   103 
    94 const struct widen_entry widen_ADD_table[] = {
   104 const struct widen_entry widen_ADD_table[] = {
    95 #define __add(TYPE)       \
   105 #define __add(TYPE)       \
    96     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   106     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
    97     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   107     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
    98     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   108     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
    99     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   109     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   100     __ANY_NUM(__add)
   110     __ANY_NUM(__add)
   101 #undef __add
   111 #undef __add
   102 
   112 
   103     /*******************************************/
   113     /*******************************************/
   104     /*******************************************/
   114     /*******************************************/
   105     /*** Operations with TIME, DT and TOD... ***/
   115     /*** Operations with TIME, DT and TOD... ***/
   106     /*******************************************/
   116     /*******************************************/
   107     /*******************************************/ 
   117     /*******************************************/ 
   108     { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   118     { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
   109     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   119     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   110     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   120     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   111     /* not currently supported by stage4, so it is best no tto add it for now... */
   121     /* not currently supported by stage4, so it is best no tto add it for now... */
   112 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   122 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   113     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
   123     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
   114     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   124     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   115     /* not currently supported by stage4, so it is best no tto add it for now... */
   125     /* not currently supported by stage4, so it is best no tto add it for now... */
   116 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
   126 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
   117 
   127 
   118     /*******************************/
   128     /*******************************/
   119     /* SAFE version on the left... */
   129     /* SAFE version on the left... */
   120     /*******************************/
   130     /*******************************/
   121     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   131     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
   122     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   132     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   123     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   133     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   124     /* not currently supported by stage4, so it is best no tto add it for now... */
   134     /* not currently supported by stage4, so it is best no tto add it for now... */
   125 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   135 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::tod_type_name,             &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   126     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
   136     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
   127     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   137     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   128     /* not currently supported by stage4, so it is best no tto add it for now... */
   138     /* not currently supported by stage4, so it is best no tto add it for now... */
   129 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
   139 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::dt_type_name,              &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
   130 
   140 
   131     /********************************/
   141     /********************************/
   132     /* SAFE version on the right... */
   142     /* SAFE version on the right... */
   133     /********************************/
   143     /********************************/
   134     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,     widen_entry::ok         },
   144     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,         widen_entry::ok         },
   135     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   145     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   136     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   146     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   137     /* not currently supported by stage4, so it is best no tto add it for now... */
   147     /* not currently supported by stage4, so it is best no tto add it for now... */
   138 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetod_type_name,         &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   148 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetod_type_name,         &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   139     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
   149     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
   140     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   150     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   141     /* not currently supported by stage4, so it is best no tto add it for now... */
   151     /* not currently supported by stage4, so it is best no tto add it for now... */
   142 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::safedt_type_name,          &search_constant_type_c::dt_type_name,       widen_entry::deprecated },         
   152 //  { &search_constant_type_c::time_type_name,          &search_constant_type_c::safedt_type_name,          &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },         
   143 
   153 
   144     /*************************************/
   154     /*************************************/
   145     /* SAFE version on left and right... */
   155     /* SAFE version on left and right... */
   146     /*************************************/
   156     /*************************************/
   147     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name, widen_entry::ok         },
   157     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name,     widen_entry::ok                 },
   148     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,  widen_entry::deprecated },
   158     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
   149     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   159     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   150     /* not currently supported by stage4, so it is best no tto add it for now... */
   160     /* not currently supported by stage4, so it is best no tto add it for now... */
   151 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetod_type_name,  widen_entry::deprecated },
   161 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
   152     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,   widen_entry::deprecated },         
   162     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },         
   153     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   163     /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
   154     /* not currently supported by stage4, so it is best no tto add it for now... */
   164     /* not currently supported by stage4, so it is best no tto add it for now... */
   155 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safedt_type_name,   widen_entry::deprecated },
   165 //  { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },
   156    
   166    
   157     { NULL, NULL, NULL, widen_entry::ok },
   167     { NULL, NULL, NULL, widen_entry::ok },
   158 };
   168 };
   159 
   169 
   160 
   170 
   163 
   173 
   164 
   174 
   165 
   175 
   166 const struct widen_entry widen_SUB_table[] = {
   176 const struct widen_entry widen_SUB_table[] = {
   167 #define __sub(TYPE)       \
   177 #define __sub(TYPE)       \
   168     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   178     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   169     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   179     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   170     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   180     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   171     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   181     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   172     __ANY_NUM(__sub)
   182     __ANY_NUM(__sub)
   173 #undef __sub
   183 #undef __sub
   174 
   184 
   175     /*******************************************/
   185     /*******************************************/
   176     /*******************************************/
   186     /*******************************************/
   177     /*** Operations with TIME, DT and TOD... ***/
   187     /*** Operations with TIME, DT and TOD... ***/
   178     /*******************************************/
   188     /*******************************************/
   179     /*******************************************/ 
   189     /*******************************************/ 
   180     { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   190     { &search_constant_type_c::time_type_name,          &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
   181     { &search_constant_type_c::date_type_name,          &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   191     { &search_constant_type_c::date_type_name,          &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
   182     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   192     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   183     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   193     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
   184     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },
   194     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
   185     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,     widen_entry::deprecated },        
   195     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
   186 
   196 
   187     /*******************************/
   197     /*******************************/
   188     /* SAFE version on the left... */
   198     /* SAFE version on the left... */
   189     /*******************************/
   199     /*******************************/
   190     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::ok         },
   200     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         widen_entry::ok                 },
   191     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   201     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::date_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
   192     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   202     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::time_type_name,            &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   193     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   203     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::tod_type_name,             &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
   194     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,       widen_entry::deprecated },
   204     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
   195     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,     widen_entry::deprecated },        
   205     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::dt_type_name,              &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
   196 
   206 
   197     /********************************/
   207     /********************************/
   198     /* SAFE version on the right... */
   208     /* SAFE version on the right... */
   199     /********************************/
   209     /********************************/
   200     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,     widen_entry::ok         },
   210     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,         widen_entry::ok                 },
   201     { &search_constant_type_c::date_type_name,          &search_constant_type_c::safedate_type_name,        &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   211     { &search_constant_type_c::date_type_name,          &search_constant_type_c::safedate_type_name,        &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
   202     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,      widen_entry::deprecated },
   212     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetime_type_name,        &search_constant_type_c::tod_type_name,          ANYTIME_OPER_DEPRECATION_STATUS },
   203     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetod_type_name,         &search_constant_type_c::time_type_name,     widen_entry::deprecated },
   213     { &search_constant_type_c::tod_type_name,           &search_constant_type_c::safetod_type_name,         &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },
   204     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,       widen_entry::deprecated },
   214     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safetime_type_name,        &search_constant_type_c::dt_type_name,           ANYTIME_OPER_DEPRECATION_STATUS },
   205     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safedt_type_name,          &search_constant_type_c::time_type_name,     widen_entry::deprecated },        
   215     { &search_constant_type_c::dt_type_name,            &search_constant_type_c::safedt_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS },        
   206 
   216 
   207     /*************************************/
   217     /*************************************/
   208     /* SAFE version on left and right... */
   218     /* SAFE version on left and right... */
   209     /*************************************/
   219     /*************************************/
   210     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name, widen_entry::ok         },
   220     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name,     widen_entry::ok                 },
   211     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::safedate_type_name,        &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   221     { &search_constant_type_c::safedate_type_name,      &search_constant_type_c::safedate_type_name,        &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
   212     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,  widen_entry::deprecated },
   222     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetod_type_name,      ANYTIME_OPER_DEPRECATION_STATUS },
   213     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   223     { &search_constant_type_c::safetod_type_name,       &search_constant_type_c::safetod_type_name,         &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
   214     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,   widen_entry::deprecated },
   224     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safedt_type_name,       ANYTIME_OPER_DEPRECATION_STATUS },
   215     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safetime_type_name, widen_entry::deprecated },        
   225     { &search_constant_type_c::safedt_type_name,        &search_constant_type_c::safedt_type_name,          &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },        
   216 
   226 
   217     { NULL, NULL, NULL, widen_entry::ok },
   227     { NULL, NULL, NULL, widen_entry::ok },
   218 };
   228 };
   219 
   229 
   220 
   230 
   223 
   233 
   224 
   234 
   225 
   235 
   226 const struct widen_entry widen_MUL_table[] = {
   236 const struct widen_entry widen_MUL_table[] = {
   227 #define __mul(TYPE)       \
   237 #define __mul(TYPE)       \
   228     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   238     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   229     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   239     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   230     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   240     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   231     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   241     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   232     __ANY_NUM(__mul)
   242     __ANY_NUM(__mul)
   233 #undef __mul
   243 #undef __mul
   234 
   244 
   235     /*******************************************/
   245     /*******************************************/
   236     /*******************************************/
   246     /*******************************************/
   237     /*** Operations with TIME, DT and TOD... ***/
   247     /*** Operations with TIME, DT and TOD... ***/
   238     /*******************************************/
   248     /*******************************************/
   239     /*******************************************/ 
   249     /*******************************************/ 
   240 #define __multime(TYPE)       \
   250 #define __multime(TYPE)       \
   241     { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   251     { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   242     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   252     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   243     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   253     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   244     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name, widen_entry::deprecated }, \
   254     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS }, \
   245     /* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */                 \
   255     /* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */                 \
   246     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   256     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   247     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   257     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::time_type_name,            &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   248     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   258     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safetime_type_name,        &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   249     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   259     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safetime_type_name,        &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
   250     __ANY_NUM(__multime)
   260     __ANY_NUM(__multime)
   251 #undef __multime
   261 #undef __multime
   252 
   262 
   253     { NULL, NULL, NULL, widen_entry::ok },
   263     { NULL, NULL, NULL, widen_entry::ok },
   254 };
   264 };
   257 
   267 
   258 
   268 
   259 
   269 
   260 const struct widen_entry widen_DIV_table[] = {
   270 const struct widen_entry widen_DIV_table[] = {
   261 #define __div(TYPE)       \
   271 #define __div(TYPE)       \
   262     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   272     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   263     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   273     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   264     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   274     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   265     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   275     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   266     __ANY_NUM(__div)
   276     __ANY_NUM(__div)
   267 #undef __div
   277 #undef __div
   268 
   278 
   269     /*******************************************/
   279     /*******************************************/
   270     /*******************************************/
   280     /*******************************************/
   271     /*** Operations with TIME, DT and TOD... ***/
   281     /*** Operations with TIME, DT and TOD... ***/
   272     /*******************************************/
   282     /*******************************************/
   273     /*******************************************/ 
   283     /*******************************************/ 
   274 #define __divtime(TYPE)       \
   284 #define __divtime(TYPE)       \
   275     { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   285     { &search_constant_type_c::time_type_name,          &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   276     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   286     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   277     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,     widen_entry::deprecated }, \
   287     { &search_constant_type_c::time_type_name,          &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::time_type_name,         ANYTIME_OPER_DEPRECATION_STATUS }, \
   278     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name, widen_entry::deprecated },
   288     { &search_constant_type_c::safetime_type_name,      &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safetime_type_name,     ANYTIME_OPER_DEPRECATION_STATUS },
   279     __ANY_NUM(__divtime)
   289     __ANY_NUM(__divtime)
   280 #undef __divtime
   290 #undef __divtime
   281 
   291 
   282     { NULL, NULL, NULL, widen_entry::ok },
   292     { NULL, NULL, NULL, widen_entry::ok },
   283  };
   293  };
   285  
   295  
   286 
   296 
   287 
   297 
   288 const struct widen_entry widen_MOD_table[] = {
   298 const struct widen_entry widen_MOD_table[] = {
   289 #define __mod(TYPE)       \
   299 #define __mod(TYPE)       \
   290     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   300     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   291     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   301     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   292     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   302     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   293     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   303     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   294     __ANY_NUM(__mod)
   304     __ANY_NUM(__mod)
   295 #undef __mod
   305 #undef __mod
   296 
   306 
   297     { NULL, NULL, NULL, widen_entry::ok },
   307     { NULL, NULL, NULL, widen_entry::ok },
   298 };
   308 };
   300  
   310  
   301 
   311 
   302 
   312 
   303 const struct widen_entry widen_EXPT_table[] = {
   313 const struct widen_entry widen_EXPT_table[] = {
   304 #define __expt(IN2TYPE, IN1TYPE)       \
   314 #define __expt(IN2TYPE, IN1TYPE)       \
   305     { &search_constant_type_c::IN1TYPE##_type_name,        &search_constant_type_c::IN2TYPE##_type_name,          &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok     }, \
   315     { &search_constant_type_c::IN1TYPE##_type_name,        &search_constant_type_c::IN2TYPE##_type_name,          &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
   306     { &search_constant_type_c::safe##IN1TYPE##_type_name,  &search_constant_type_c::IN2TYPE##_type_name,          &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok     }, \
   316     { &search_constant_type_c::safe##IN1TYPE##_type_name,  &search_constant_type_c::IN2TYPE##_type_name,          &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
   307     { &search_constant_type_c::IN1TYPE##_type_name,        &search_constant_type_c::safe##IN2TYPE##_type_name,    &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok     }, \
   317     { &search_constant_type_c::IN1TYPE##_type_name,        &search_constant_type_c::safe##IN2TYPE##_type_name,    &search_constant_type_c::IN1TYPE##_type_name,       widen_entry::ok        }, \
   308     { &search_constant_type_c::safe##IN1TYPE##_type_name,  &search_constant_type_c::safe##IN2TYPE##_type_name,    &search_constant_type_c::safe##IN1TYPE##_type_name, widen_entry::ok     },
   318     { &search_constant_type_c::safe##IN1TYPE##_type_name,  &search_constant_type_c::safe##IN2TYPE##_type_name,    &search_constant_type_c::safe##IN1TYPE##_type_name, widen_entry::ok        },
   309 #define __IN2_anynum_(IN1_TYPENAME)   __ANY_NUM_1(__expt,IN1_TYPENAME)
   319 #define __IN2_anynum_(IN1_TYPENAME)   __ANY_NUM_1(__expt,IN1_TYPENAME)
   310     __ANY_REAL(__IN2_anynum_)
   320     __ANY_REAL(__IN2_anynum_)
   311 #undef __expt
   321 #undef __expt
   312 #undef __IN2_anynum_
   322 #undef __IN2_anynum_
   313     { NULL, NULL, NULL, widen_entry::ok },
   323     { NULL, NULL, NULL, widen_entry::ok },
   325 /**************************************************************/
   335 /**************************************************************/
   326 /**************************************************************/
   336 /**************************************************************/
   327 /* table used by AND and ANDN operators, and and_expression */
   337 /* table used by AND and ANDN operators, and and_expression */
   328 const struct widen_entry widen_AND_table[] = {
   338 const struct widen_entry widen_AND_table[] = {
   329 #define __and(TYPE)       \
   339 #define __and(TYPE)       \
   330     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   340     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   331     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   341     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   332     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   342     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   333     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   343     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   334     __ANY_BIT(__and)
   344     __ANY_BIT(__and)
   335 #undef __and
   345 #undef __and
   336 
   346 
   337     { NULL, NULL, NULL, widen_entry::ok },
   347     { NULL, NULL, NULL, widen_entry::ok },
   338 };
   348 };
   339 
   349 
   340 /* table used by OR and ORN operators, and or_expression */
   350 /* table used by OR and ORN operators, and or_expression */
   341 const struct widen_entry widen_OR_table[] = {
   351 const struct widen_entry widen_OR_table[] = {
   342 #define __or(TYPE)       \
   352 #define __or(TYPE)       \
   343     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   353     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   344     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   354     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   345     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   355     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   346     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   356     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   347     __ANY_BIT(__or)
   357     __ANY_BIT(__or)
   348 #undef __or
   358 #undef __or
   349 
   359 
   350     { NULL, NULL, NULL, widen_entry::ok },
   360     { NULL, NULL, NULL, widen_entry::ok },
   351 };
   361 };
   352 
   362 
   353 
   363 
   354 /* table used by XOR and XORN operators, and xor_expression */
   364 /* table used by XOR and XORN operators, and xor_expression */
   355 const struct widen_entry widen_XOR_table[] = {
   365 const struct widen_entry widen_XOR_table[] = {
   356 #define __xor(TYPE)       \
   366 #define __xor(TYPE)       \
   357     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   367     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   358     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   368     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   359     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok     }, \
   369     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::TYPE##_type_name,       widen_entry::ok                 }, \
   360     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok     },
   370     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok                 },
   361     __ANY_BIT(__xor)
   371     __ANY_BIT(__xor)
   362 #undef __xor
   372 #undef __xor
   363 
   373 
   364     { NULL, NULL, NULL, widen_entry::ok },
   374     { NULL, NULL, NULL, widen_entry::ok },
   365 };
   375 };
   374 /**************************************************************/
   384 /**************************************************************/
   375 /**************************************************************/
   385 /**************************************************************/
   376 /* table used by GT, GE, EQ, LE, LT, and NE  operators, and equivalent ST expressions. */
   386 /* table used by GT, GE, EQ, LE, LT, and NE  operators, and equivalent ST expressions. */
   377 const struct widen_entry widen_CMP_table[] = {
   387 const struct widen_entry widen_CMP_table[] = {
   378 #define __cmp(TYPE)       \
   388 #define __cmp(TYPE)       \
   379     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::bool_type_name,         widen_entry::ok     }, \
   389     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::bool_type_name,         widen_entry::ok                 }, \
   380     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::bool_type_name,         widen_entry::ok     }, \
   390     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::TYPE##_type_name,          &search_constant_type_c::bool_type_name,         widen_entry::ok                 }, \
   381     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::bool_type_name,         widen_entry::ok     }, \
   391     { &search_constant_type_c::TYPE##_type_name,        &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::bool_type_name,         widen_entry::ok                 }, \
   382     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safebool_type_name,     widen_entry::ok     },
   392     { &search_constant_type_c::safe##TYPE##_type_name,  &search_constant_type_c::safe##TYPE##_type_name,    &search_constant_type_c::safebool_type_name,     widen_entry::ok                 },
   383     __ANY_ELEMENTARY(__cmp)
   393     __ANY_ELEMENTARY(__cmp)
   384 #undef __cmp
   394 #undef __cmp
   385 
   395 
   386     { NULL, NULL, NULL, widen_entry::ok },
   396     { NULL, NULL, NULL, widen_entry::ok },
   387 };
   397 };