Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
3-byte ints
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Dave Thompson, post: 1679101"] (Within a struct, shown later.) It will do exactly 24-bit arithmetic, which is 3 bytes IF a byte is 8 bits, as is very common but not required. It, or rather the "allocation unit" containing it, is very likely to occupy 32 bits or 4 usual-bytes/octets. This difference matters only if you write out the/a containing struct to a file or over a network etc., since you can't form (or use) a pointer to a bitfield member; or if you (need to) care about the actual memory/bus accesses performed by the compiled (object) form of your code when executed. (explicitly) signed int, unsigned int, or "plain" int which unlike non-char integer types elsewhere is not automatically signed, it is implementation-defined as signed or unsigned. And C99 also standardly allows _Bool (or bool with stdbool.h). Plus _tmp already had type unsigned long. Unless perhaps the OP (or someone) did <GACK!> #define long int </> since you are using gcc, check the preprocessor output with -E . - David.Thompson1 at worldnet.att.net [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
3-byte ints
Top