Ticket #501 (Open)Fri Nov 27 15:44:33 UTC 2020
cc 5.85: Designated initialisers incorrectly initialise anonymous unions
Reported by: | Jeffrey Lee (213) | Severity: | Major |
Part: | RISC OS: C/C++ toolchain | Release: | |
Milestone: | Status | Open |
Details by Jeffrey Lee (213):
Using designated initialisers to initialise a struct containing anonyomous unions results in the values being written to the wrong location. The equivalent code using named unions appears to work OK (see attached code).
*cc two.c
Norcroft RISC OS ARM C vsn 5.85 [22 Oct 2020]
*two
00000000 00000005
00000005 00000000
Note: attempting to initialise the .y or .b members of v results in an internal compiler error.
Changelog:
Modified by Jeffrey Lee (213) Fri, November 27 2020 - 15:45:08 GMT
- Attachment added: two