Page MenuHomeFreeBSD

Define max_align_t for C11.
ClosedPublic

Authored by jhb on Oct 8 2016, 6:26 AM.
Tags
None
Referenced Files
F172737156: D8194.id21556.diff
Sun, Sep 20, 3:50 PM
F172736909: D8194.id21607.diff
Sun, Sep 20, 3:48 PM
F172736683: D8194.id21180.diff
Sun, Sep 20, 3:46 PM
Unknown Object (File)
Sun, Sep 20, 1:57 PM
Unknown Object (File)
Sun, Sep 20, 7:50 AM
Unknown Object (File)
Wed, Sep 16, 3:11 PM
Unknown Object (File)
Mon, Sep 14, 8:48 AM
Unknown Object (File)
Sun, Sep 6, 10:49 AM
Subscribers

Details

Summary

Define max_align_t for C11.

libc++'s stddef.h includes an existing definition of max_align_t for
C++11, but it is only defined for C++, not for C. In addition, GCC and
clang both define an alternate version of max_align_t that uses a
union of multiple types rather than a plain long double as in libc++.
This adds a __max_align_t to <sys/_types.h> that matches the GCC and
clang definition that is mapped to max_align_t in <stddef.h>.

PR: 210890

Test Plan
  • universe and an exp-run. One port failed during the exp-run which I still haven't fixed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Define max_align_t for C11..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: dim.
  • Fix name of GCC macro used to note that max_align_t is defined.
dim edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 20 2016, 6:50 PM
This revision was automatically updated to reflect the committed changes.