From:  Tim Rentsch <tr.17687@z991.linuxsc.com>
Date:  14 Oct 2024 13:00:39 Hong Kong Time
Newsgroup:  news.alt119.net/comp.lang.c
Subject:  

Re: c initialization algorithm

NNTP-Posting-Host:  null

Kaz Kylheku <643-408-1753@kylheku.com> writes:

> On 2024-10-13, Thiago Adams  wrote:
>
>> The algorithm for C initialization as described in the standard
>> and implemented in gcc allow this.
>>
>> struct X{
>>      int a,b,c;
>> };
>>
>> int main()
>> {
>>      struct X x = {.a=1,2,3,.a=1, 2, 3};
>> }
>>
>> https://godbolt.org/z/7naedbEM6
>>
>> Basically, when a designed initializer is found the "cursor" goes
>> to that member and the following members are initialized in
>> order.
>
>  I do not suspect that therw is an observable order.  I.e. as
>  in a required order considered observable behavior.

Have you checked to C standard to see what it says about that?