Re: C23 thoughts and opinions

Liste des GroupesRevenir à cl c 
Sujet : Re: C23 thoughts and opinions
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.c
Date : 05. Jun 2024, 08:14:37
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3p38t$s5n4$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Pan/0.158 (Avdiivka; )
On Tue, 4 Jun 2024 12:48:31 -0500, BGB wrote:

Though, I do have some questionable experimental features, like a
compiler option to cause arrays and pointers to be bounds-checked, which
is sometimes useful in debugging (but in some cases can add bugs of its
own; also makes the binaries bigger and negatively effects performance,
...).

I remember some research being done into this, back in the days of Pascal.

Remember that, in Pascal (and Ada), subranges exist as types in their own
right, not just as bounds of arrays. And this allows the compiler to
optimize array-bounds checks, and sometimes get rid of them altogether.
E.g.

    type
        boundstype = 1 .. 10;
    var
        myarr : array [boundstype] of elttype;
        index : boundstype;

With these definitions, an expression like

    myarr[index]

doesn’t require any bounds-checking. Of course, assignments to index may
require bounds-checking, depending on the types of values involved.

Date Sujet#  Auteur
1 Jun 24 * Re: C23 thoughts and opinions37Lynn McGuire
1 Jun 24 +* Re: C23 thoughts and opinions3David Brown
1 Jun 24 i`* Re: C23 thoughts and opinions2Malcolm McLean
2 Jun 24 i `- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
2 Jun 24 `* Re: C23 thoughts and opinions33Michael S
2 Jun 24  +* Re: C23 thoughts and opinions23David Brown
2 Jun 24  i`* Re: C23 thoughts and opinions22Michael S
2 Jun 24  i `* Re: C23 thoughts and opinions21David Brown
3 Jun 24  i  `* Re: C23 thoughts and opinions20Michael S
3 Jun 24  i   `* Re: C23 thoughts and opinions19David Brown
3 Jun 24  i    +- Re: C23 thoughts and opinions1David Brown
3 Jun 24  i    +* Re: C23 thoughts and opinions16Michael S
4 Jun 24  i    i+- Re: C23 thoughts and opinions1Kaz Kylheku
4 Jun 24  i    i+* Re: C23 thoughts and opinions11Kaz Kylheku
4 Jun 24  i    ii+- Re: C23 thoughts and opinions1Michael S
4 Jun 24  i    ii+- Re: C23 thoughts and opinions1David Brown
4 Jun 24  i    ii`* Re: C23 thoughts and opinions8BGB
4 Jun 24  i    ii +* Re: C23 thoughts and opinions2BGB-Alt
5 Jun 24  i    ii i`- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
5 Jun 24  i    ii `* Re: C23 thoughts and opinions5Lawrence D'Oliveiro
5 Jun 24  i    ii  `* Re: C23 thoughts and opinions4BGB
7 Jun 24  i    ii   `* Re: C23 thoughts and opinions3Lawrence D'Oliveiro
7 Jun 24  i    ii    `* Re: C23 thoughts and opinions2BGB
14 Jun 24  i    ii     `- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
5 Jun 24  i    i`* Re: C23 thoughts and opinions3Lawrence D'Oliveiro
5 Jun 24  i    i +- Re: C23 thoughts and opinions1Dan Cross
7 Jun 24  i    i `- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
4 Jun 24  i    `- Re: C23 thoughts and opinions1Lawrence D'Oliveiro
2 Jun 24  +- Re: C23 thoughts and opinions1Chris M. Thomasson
3 Jun 24  `* Re: C23 thoughts and opinions8Lawrence D'Oliveiro
3 Jun 24   +- Re: C23 thoughts and opinions1David Brown
3 Jun 24   `* Re: C23 thoughts and opinions6Tim Rentsch
4 Jun 24    `* Re: C23 thoughts and opinions5BGB
5 Jun 24     `* Re: C23 thoughts and opinions4BGB
5 Jun 24      +* Re: C23 thoughts and opinions2Paul
5 Jun 24      i`- Re: C23 thoughts and opinions1BGB
5 Jun 24      `- Re: C23 thoughts and opinions1BGB

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal