I'm trying to figure out how initialization of anonymous
structures and unions is supposed to work, particularly when
using brace-enclosed initializer lists without designators.
[..elaboration..]
In general, GCC and Clang seem to be acting like an anonymous
structure or union participates in initialization as a structure
or union, even though it is unnamed. This would be a reasonable
thing to do in the abstract, but I don't see how it agrees with
the wording in the standard. Am I missing something, or do GCC
and Clang get this wrong?
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,128 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 46:21:00 |
| Calls: | 14,453 |
| Calls today: | 3 |
| Files: | 186,423 |
| D/L today: |
23,372 files (6,712M bytes) |
| Messages: | 2,558,324 |