What is the practical advantage of _BitInt(10) over int16_t when both have the same sizeof?
_BitInt is a feature introduced in C23 that allows us to define integer variables with an arbitrary width. Every variable that is defined is considered an independent object, and unlike bit-fields in structures, these variables do not overlap with one another. Now, when it comes to architecture, there is something I find confusing! Why, given the architecture we have, would someone want to use _BitInt and restrict the width of a variable if _BitInt(10) is going to occupy 16 bits of space anyway? In other words, six bits remain unused simply because the variable's width has been restricted. Eve
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.