Ticket #502 (Fixed)Fri Nov 27 16:21:08 UTC 2020
cc 5.85: Reading anonyomous struct/union members sometimes returns the wrong value
Reported by: | Jeffrey Lee (213) | Severity: | Major |
Part: | RISC OS: C/C++ toolchain | Release: | |
Milestone: | Status | Fixed |
Details by Jeffrey Lee (213):
The attached code produces incorrect output (5 0, 5 5). The situation that triggers the bug seems to depend on a number of conditions; if you make any of the following changes then the correct output will be produced:
1. Rearrange the struct definition (swap the #if 1 to #if 0)
2. Make the structs & unions non-anonymous
3. Replace the void * members with ints
Changelog:
Modified by Jeffrey Lee (213) Fri, November 27 2020 - 16:21:20 GMT
- Attachment added: three
Modified by Jeffrey Lee (213) Sun, February 28 2021 - 17:37:28 GMT
- Status changed from Open to Fixed
Appears to be fixed in CC 5.86 (DDE30a)