On 10/13/2015 11:28 AM, Oleg Smolsky wrote:
-enum tcmu_opcode { +enum tcmu_opcode +#if defined(__cplusplus) + : __u32 +#endif +{
Will this work with older C++ compilers ?
static inline enum tcmu_opcode tcmu_hdr_get_op(__u32 len_op) { - return len_op & TCMU_OP_MASK; + __u32 rv = len_op & TCMU_OP_MASK; +#if defined(__cplusplus) + return tcmu_opcode(rv); +#else + return rv; +#endif }
How about using (enum tcmu_opcode)rv for C and C++ instead of the #ifdef construct ?
Bart. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html