| Summary: | a _lot_ of strict aliasing warnings | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ozkan Sezer <sezeroz> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | warnings log | ||
Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release. Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon. If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks. Thanks! --ryan. Ozkan, do you have a proposed patch for this? For 2.0.10, we can just do -fno-strict-aliasing if this is going to be a problem. (In reply to Sam Lantinga from comment #2) > Ozkan, do you have a proposed patch for this? Nope. not at the moment. (In reply to Ryan C. Gordon from comment #3) > For 2.0.10, we can just do -fno-strict-aliasing if this is going to be a > problem. Not really a _problem_, just annoyance. Let's use -fno-strict-aliasing. In my reading it seems like if we don't do that we might have subtle optimization related bugs at any time. I added -fno-strict-aliasing as a temporary workaround here: https://hg.libsdl.org/SDL/rev/1a330416800d We can come back to this with real fixes to re-enable these compiler optimizations after 2.0.10 ships. |
Created attachment 3300 [details] warnings log A horde of strict aliasing violation warnings are emitted from joystick layer, and also from a few other places. This happens with gcc-4.4.7 on Linux CentOS 6.10. Some other sysjoystick would possibly have the same warnings. Attached my full log here. Example entry: src/joystick/SDL_joystick.c: In function 'SDL_GetJoystickGUIDInfo': src/joystick/SDL_joystick.c:1094: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules