2 ms·
> You need some low-level justification for using an uint32_t and such: like conforming to some externally imposed data format or memory-mapped register bank.
by lmm 8y ago
> You need some low-level justification for using an uint32_t and such: like conforming to some externally imposed data format or memory-mapped register bank.
This is backwards. You should use uint32_t etc. like any higher-level language would, unless you have specific reasons to know you need a machine-sized type. Making your code behave differently in some arbitrary, untested way on machines with different default int sizes isn't going to make it "less limited", it's just going to make it broken.
- deleted 8y ago[deleted]
- kazinator 8y agoCan you cite one page in the K&R2 where the authors are using some 32-bit-specific integer? Or any other decent C book: Harbison and Steele? C Traps and Pitfalls?