Document: N1749
Date: 2013-08-30
Author: Douglas Walls
Subject: Suggested Technical Corregendum for DR 413


The committee discusions of the DR for three meetings has been along the lines that
the intent of the standard for the example given in the DR is 42.  The committee
however has been unable to come up with any improvement to the words to make
it any clearer.  N1659 was one such attempt, that included an example.

I'm suggesting in this paper that we give a committee response to the question
raised, and use the example from N1659 for a Technical Corrigendum.

Suggested Committee Response for DR 413

The value of l.t.k is 42.

Suggested Technical Corrigendum for DR 413

Add the following example to 6.7.9:

    typedef struct {
        int k; int l;

        int a[2];
        } T;

    typedef struct {
        int i;

        T t;
    } S;


    T x = {.l = 43, .k = 42, .a[1] = 19, .a[0] = 18 };

    void f(void)
    {

        S l = { 1, .t = x, .t.l = 41, .t.a[1] = 17};
    }

The value of l.t.k is 42, because implicit initialization does not override explicit initialization.