Showing content from https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1749.htm below:
Suggested Technical Corregendum for DR 413
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 413Add 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.
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4