Structures? Are we talking about c?
-
-
-
Yes C. What about structures?
-
I guess pointer arithmetic isn't okay within structures. I guess order isn't guaranteed other. I'm recalling a lot of shaky code from my memory...
-
All objects in C, including structures, have a /representation/, which is an overaid (permitted to alias) array of unsigned char [sizeof object]. Within this array relational operators and arithmetic are well-defined; otherwise offsetof would make no sense. Order is guaranteed.
-
Order is guaranteed in structures? Even on bit arrays?
-
Bitfield members don't have addresses or offsets, so it's not really meaningful to ask about their order. Of course bytes corresponding to them appear in the representation though. Within a unit the order is implementation-defined.
-
Order could be important
-
Yes. In practice implementations (ABIs) define bitfield bit order to match byte order.
- 6 more replies
New conversation -
-
-
It’s important that these protection mechanisms remain in the public domain much like the NIST standard cryptographic algorithms and IETF cryptographic protocols. They are a public good and should not be proprietary. There is prior art.
@kasanovicThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Possibly excepting O/S access to the wierdness of some device-control registers (multiple split control-register address-space per device, control protocols that spit the variable relative address of the "next" control register as the output of a register-write, and so on... 1/2
-
All otherwise known as "the bonkers stuff that low-level hardware designers inflict on the rest of us". 2/2
End of conversation
New conversation -
-
-
@kasanovic we had discussed using the 65th (among using keys in the unused “canonical pointer” bits) in RISC-V. i.e. pointers as a distinct “group” with constrained operations; and LOAD-POINTER to distinguish type at the ISA level.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.