Skip to content

a _lot_ of strict aliasing warnings #2974

Open
@SDLBugzilla

Description

@SDLBugzilla

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2018-09-07 08:12:13 +0000, Ozkan Sezer wrote:

Created attachment 3300
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

On 2019-05-18 18:48:54 +0000, Ryan C. Gordon wrote:

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.

On 2019-05-19 18:27:09 +0000, Sam Lantinga wrote:

Ozkan, do you have a proposed patch for this?

On 2019-05-19 20:13:34 +0000, Ryan C. Gordon wrote:

For 2.0.10, we can just do -fno-strict-aliasing if this is going to be a problem.

On 2019-05-21 05:05:41 +0000, Ozkan Sezer wrote:

(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.

On 2019-05-22 00:38:33 +0000, Sam Lantinga wrote:

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.

On 2019-06-09 01:33:36 +0000, Sam Lantinga wrote:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions