Re: 80386 C compiler

Liste des GroupesRevenir à cl c  
Sujet : Re: 80386 C compiler
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.c
Date : 27. Nov 2024, 20:42:50
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20241127112746.171@kylheku.com>
References : 1 2 3 4 5 6 7
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-11-27, David Brown <david.brown@hesbynett.no> wrote:
On 26/11/2024 18:59, Kaz Kylheku wrote:
On 2024-11-25, Rosario19 <Ros@invalid.invalid> wrote:
On Mon, 25 Nov 2024 18:23:58 -0000 (UTC), Kaz Kylheku  wrote:
>
void fn(int a)
{
   int x[3] = { foo(), bar(), a }; /* not in C90 */
>
is in the above foo() called before bar()?
 
No, you cannot rely on that. Maybe it's fixed in a more recent standard,
>
The implication of the word "fixed" is that you think the current
standards as somehow "broken" in this respect.  Do you think that is the
case?

The specification has an inconsistency, because it gives the order
in which initializations occur, yet not the order of evaluation of
the expressions that produce their values.

Above we know that x[0] is initialized first before x[1].

That doesn't even matter unless initializations are being observed,
which they can be if there is self-reference going on, like:

  int x[3] = { foo(), x[0] + bar(), x[0] + x[1] }

I'm assuming this sort of thing must to be the purpose for specifying
the order of initialization.

It looks inconsistent to me that the effects of the subobjects receiving
their inital values are ordered, but all other effects are not.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

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