Re:My personal C coding style as of late 2023
by self_awareness on Monday October 09, 2023 @06:15AM
(#37818818)
Isn't "int" 64-bit on some (rare) architectures?
[ Parent
| on HN ]
Re:My personal C coding style as of late 2023
by colejohnson66 on Monday October 09, 2023 @08:40AM
(#37819829)
Not sure about 64-bit `int`, but it is 16-bit on some 16-bit micros, such as the AVR line (used by the original Arduino).
Re:My personal C coding style as of late 2023
by galangalalgol on Monday October 09, 2023 @09:03AM
(#37820042)
Ti dsps have 48bits for long.
Re:My personal C coding style as of late 2023
by i_am_a_peasant on Monday October 09, 2023 @10:36AM
(#37820876)
yeah i had 48 bit pointers on one asic. upper 16 bits selected memory partition/region
Re:My personal C coding style as of late 2023
by colejohnson66 on Friday October 13, 2023 @12:08PM
(#37872139)
Yep. DSPs always have weird architectures, but in most cases, one isn't compiling the same code for multiple DSP architectures. As an example, the C2000 line has a 16-bit `char`; There is no support for "bytes".
Re:My personal C coding style as of late 2023
by grotorea on Monday October 09, 2023 @09:18AM
(#37820177)
Not mentioned on the table I know https://en.cppreference.com/w/cpp/language/types
edit: Oh you're right
> Other models are very rare. For example, ILP64 (8/8/8: int, long, and pointer are 64-bit) only appeared in some early 64-bit Unix systems (e.g. UNICOS on Cray).
Re:My personal C coding style as of late 2023
by terracottalite on Monday October 09, 2023 @12:20PM
(#37821973)
My computer being one of those (rare?) architectures. Though I think it is not entirely dependent on the processor and the OS choice also affects this.
Re:My personal C coding style as of late 2023
by self_awareness on Tuesday October 10, 2023 @02:42AM
(#37829169)
What machine are you using?
Re:My personal C coding style as of late 2023
by terracottalite on Tuesday October 10, 2023 @03:37PM
(#37836472)
Umm, sorry I remembered that wrong. Turns out int isn't 64 bits on my machine. I should double check before posting next time. (I mistaked long with int, and long isn't 64 bits on some systems). I can't delete it now.