Liste des Groupes | Revenir à c arch |
On 2024-09-16 10:25, Thomas Koenig wrote:
>Tim Rentsch <tr.17687@z991.linuxsc.com> schrieb:>
>[attribution lost]>>
Bringing it back to "architecture" Like Anton Ertl has said, LP64
for C/C++ is a mistake. It should always have been ILP64, and
this nonsense would go away. Any new architecture should make C
ILP64 (looking at you RISC-V, missing yet another opportunity to
not make the same mistakes as everyone else).
I believe this view is shortsighted. The big mistake is
developers hardcoding types everywhere - especially int, but
also long, and their unsigned variants. It's almost never a
good idea to hardcode a specific width (eg, uint32_t) in a type
name used for parameters or local variables, but that is by far
a very common practice.
I agree. This issue guided the design of the scalar type system
in Ada.
>
C programmers can use typedef to get part way there, but not all
the way because typedefs are still weakly typed.
Les messages affichés proviennent d'usenet.