C global anonymous struct / union

前端 未结 6 1071
一个人的身影
一个人的身影 2021-01-26 14:53

I have a uint64 variable which often only requires high or low 32 bit access. I am using a 32-bit ARM Cortex M0, and to help with speed and I am trying to overlap the uint64 var

6条回答
  •  深忆病人
    2021-01-26 15:22

    No, of course you can't access members of a non-instantiated type. Where would the data be stored?

    You should just make the union visible, and trust the compiler to generate efficient accesses. I don't think there's going to be any "pointer arithmetic", at least not at run-time.

提交回复
热议问题