Есть ли точка последовательности между инициализациями членов структуры?

Есть ли точка последовательности между выражениями инициализации членов структуры?

Например, хорошо ли определено, что приведенный ниже код всегда будет печатать «a, b»?

#include <stdio.h>

typedef struct {
    char *bytes;
    int position;
    int length;
} Stream;

typedef struct {
    char a;
    char b;
} Pair;

char streamgetc(Stream *stream) {
    return (stream->position < stream->length) ? stream->bytes[stream->position++] : 0;
}

int main(void) {
    Stream stream = {.bytes = "abc", .position = 0, .length = 3};
    Pair pair = {.a = streamgetc(&stream), .b = streamgetc(&stream)};
    printf("%c, %c\n", pair.a, pair.b);
    return 0;
}
7
задан Jon Hess 5 November 2011 в 07:37
поделиться