Re: 80386 C compiler

Liste des GroupesRevenir à cl c  
Sujet : Re: 80386 C compiler
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.c
Date : 30. Nov 2024, 06:00:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <865xo5pb8b.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Kaz Kylheku <643-408-1753@kylheku.com> writes:

On 2024-11-27, James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>
If there weren't a rule mandating the order in which initializers
were applied, when two or more initializers affect the same
object, it wouldn't be possible to be certain which one overrode
the others.

That's wrong.  The priority rule for initializing the same subobject
depends not on order of evaluation but on syntactic order.  There
doesn't have to be a rule for evaluation order to make the order
of subobject overriding be well defined.

It would make sense for that simply to be a constraint violation;
two initializations for the same object are being requested.

It isn't that simple.  There are situations where overriding the
initialization of a particular subobject makes sense, and is
useful.  Example:

   typedef struct { int x, y; } Bas;
   typedef struct { Bas b[2]; } Foo;

   Foo
   sample_foo( Bas b ){
      Foo foo = { b, b, .b[1].y = -1 };
      return  foo;
   }

The subobject .b[1].y is overridden, but we can't take the previous
initialization of .b[1] without changing the semantics.

Date Sujet#  Auteur
24 Nov 24 * 80386 C compiler36Paul Edwards
24 Nov 24 +* Re: 80386 C compiler6fir
24 Nov 24 i+* Re: 80386 C compiler2fir
25 Nov 24 ii`- Re: 80386 C compiler1Paul Edwards
24 Nov 24 i`* Re: 80386 C compiler3Bart
25 Nov 24 i `* Re: 80386 C compiler2BGB
25 Nov 24 i  `- Re: 80386 C compiler1Paul Edwards
24 Nov 24 +* Re: 80386 C compiler24Janis Papanagnou
25 Nov 24 i`* Re: 80386 C compiler23Paul Edwards
25 Nov 24 i `* Re: 80386 C compiler22Kaz Kylheku
25 Nov 24 i  +* Re: 80386 C compiler20Rosario19
26 Nov 24 i  i`* Re: 80386 C compiler19Kaz Kylheku
26 Nov 24 i  i +* Re: 80386 C compiler7Keith Thompson
26 Nov 24 i  i i+* Re: 80386 C compiler5Paul Edwards
27 Nov 24 i  i ii`* Re: 80386 C compiler4Keith Thompson
27 Nov 24 i  i ii `* Re: 80386 C compiler3Paul Edwards
27 Nov 24 i  i ii  `* Re: 80386 C compiler2Keith Thompson
27 Nov 24 i  i ii   `- Re: 80386 C compiler1Paul Edwards
28 Nov 24 i  i i`- Re: 80386 C compiler1Tim Rentsch
27 Nov 24 i  i +* Re: 80386 C compiler9David Brown
27 Nov 24 i  i i`* Re: 80386 C compiler8Kaz Kylheku
27 Nov 24 i  i i +* Re: 80386 C compiler6James Kuyper
27 Nov 24 i  i i i`* Re: 80386 C compiler5Kaz Kylheku
28 Nov 24 i  i i i `* Re: 80386 C compiler4James Kuyper
30 Nov 24 i  i i i  `* Re: 80386 C compiler3Kaz Kylheku
30 Nov 24 i  i i i   +- Re: 80386 C compiler1Tim Rentsch
30 Nov 24 i  i i i   `- Re: 80386 C compiler1James Kuyper
28 Nov 24 i  i i `- Re: 80386 C compiler1David Brown
28 Nov 24 i  i +- Re: 80386 C compiler1Tim Rentsch
30 Nov 24 i  i `- Re: 80386 C compiler1Rosario19
26 Nov 24 i  `- Re: 80386 C compiler1Paul Edwards
25 Nov 24 `* Re: 80386 C compiler5Lynn McGuire
26 Nov 24  `* Re: 80386 C compiler4Keith Thompson
26 Nov 24   `* Re: 80386 C compiler3Lynn McGuire
26 Nov 24    `* Re: 80386 C compiler2Keith Thompson
26 Nov 24     `- Re: 80386 C compiler1BGB

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal