https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70911
Bug ID: 70911
Summary: Typo in "warning: initialized field with side-effects
overwritten"
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: ch3root at openwall dot com
Target Milestone: ---
When compiling such program:
int main()
{
int k = 0;
struct { int x; } s = { .x = k++, .x = 0 };
(void)s;
}
I get the following warning:
$ gcc example.c
example.c: In function ‘main’:
example.c:4:42: warning: initialized field with side-effects overwritten
[-Woverride-init-side-effects]
struct { int x; } s = { .x = k++, .x = 0 };
^
example.c:4:42: note: (near initialization for ‘s.x’)
Shouldn't "overwritten" be "overridden" instead?