Liste des Groupes | Revenir à cs raspberry-pi |
On Sun, 1 Sep 2024 11:07:17 +0100Ah yes. I was cross compiling C for a 6809 (on a PDP/11) when I discovered that to do anything with a char it was promoted into a 16 bit int, which on an 8 bit microprocessor results in a shit load of code.
mm0fmf <none@invalid.com> wrote:
On 01/09/2024 08:50, Lawrence D'Oliveiro wrote:I'll bet that broke a lot of bad code :)On Thu, 29 Aug 2024 21:33:28 +0100, druck wrote:>
>Yes stdint.h is your friend>
Unless you have an elderly code base that still hasn’t caught up with
C99 ...
Or you were programming in C on an Analog Devices SHARC were char was 32
bits.
Stll even in that environment a compliant compiler should still
provide int<n>_t types. They'd probably have to have horrendously
inefficient implementations not dissimilar to the bitfields in structs but
they should exist. Woe betide anyone who thought they could put a char into
an int16_t safely though.
Les messages affichés proviennent d'usenet.