sint64和uint32数据类型的添加导致sint64

时间:2019-02-20 08:56:39

标签: c autosar

当我打算实施sitn64和uint32的加法运算时,应返回结果,如AUTOSAR_SWS_EFXLibrary中的sint64类型一样。 但给出了一些条件,例如

[SWS_Efx_00415] 
**C operators shall not be used for 64bit data (cast, arithmetic operators and comparison operators)** 
[SWS_Efx_00416] ⌈
**64bit constants shall not be used.** 
[SWS_Efx_00417]
**Direct affectation to and from a 64 bit type shall only be used through predefined functions of 64 bits library.**
[SWS_Efx_00418] ⌈
**Only the sint64 type is allowed (uint64 shall not be used)**. ⌋ ( )
[SWS_Efx_00419] ⌈
**64bit functions do not perform saturation, even for the conversion to smaller types.** 

那么我们如何在不使用c运算符的情况下实现功能。

0 个答案:

没有答案