We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2755 - SDL2 fails to build on Solaris 10 u3
Summary: SDL2 fails to build on Solaris 10 u3
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: x86 Solaris
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-18 17:54 UTC by UX-admin
Modified: 2017-08-14 04:56 UTC (History)
2 users (show)

See Also:


Attachments
Patch for SDL_d3dmath.h (536 bytes, patch)
2014-10-18 17:54 UTC, UX-admin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description UX-admin 2014-10-18 17:54:29 UTC
Created attachment 1903 [details]
Patch for SDL_d3dmath.h

I am compiling with the Sun Studio 12 u2 compiler. There are multiple issues with the build, but this particular issue appears to be that it is illegal to declare a union of a struct of floats and a float. While GCC 4.8.1 does not flag this as an error, Sun Studio is much more standards compliant and strict, halting further compilation with an error.

Proposed patch attached; A review and/or patch feedback would be much appreciated.
Comment 1 Alex Szpakowski 2014-10-18 23:16:20 UTC
The patch treats the float variables as separate within the same union, rather than the expected behaviour of treating the float variables as a group within the union.

In other words, with that patch modifying the _11 member will also modify _12, _13, etc.
Comment 2 Sam Lantinga 2017-08-14 04:56:01 UTC
I fixed the problem with the patch and committed, thanks!
https://hg.libsdl.org/SDL/rev/b9b53f45bec6