Re: What integer C type to use (was: Cray style vectors)

Liste des GroupesRevenir à c arch 
Sujet : Re: What integer C type to use (was: Cray style vectors)
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.arch
Date : 11. Mar 2024, 15:54:07
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86le6osttc.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
scott@slp53.sl.home (Scott Lurndal) writes:

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>
scott@slp53.sl.home (Scott Lurndal) writes:
>
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>
scott@slp53.sl.home (Scott Lurndal) writes:
>
The Unix code ported relatively easily to I32LP64 because
uintptr_t had been used extensively rather than assumptions
about
sizeof(int) == sizeof(int *).
>
...
>
Sorry, I meant ptrdiff_t, which was used for pointer math.
>
I have seen little code that uses ptrdiff_t;  quite a bit that
used size_t (the unsigned brother of ptrdiff_t).  But my memory
tells me that even size_t was not very widespread in 1995.
>
In 1995 a problem with both size_t and ptrdiff_t is that there
>
Calling it a "problem" is overstating the case.  It was
straightforward enough, if not completely portable to
use the appropriate number of 'l' modifiers.

Whether it is called a problem or not, the lack of support from
printf() was mentioned upthread (by OP?), and that's why I pointed it
out.  The point is that not having the appropriate length modifiers
in C90 makes the code clumsy and the coding inconvenient.  Focusing
on what word is used is a red herring.

Date Sujet#  Auteur
11 Mar 24 o Re: What integer C type to use (was: Cray style vectors)1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal