https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88119

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Fri Feb  8 14:14:57 2019
New Revision: 268690

URL: https://gcc.gnu.org/viewcvs?rev=268690&root=gcc&view=rev
Log:
PR libstdc++/88119 use alignof in std::alignment_of, not __alignof__

Now that __alignof__ and alignof sometimes disagree it matters which one
we use. The standard says that std::alignment_of<T>::value equals
alignof(T), so we need to use that.

Change the only uses of alignment_of to use __alignof__ to avoid a
change in alignment.

Backport from mainline
2018-11-29  Jonathan Wakely  <jwak...@redhat.com>

        PR libstdc++/88119
        * include/ext/aligned_buffer.h (__aligned_membuf): Add comment.
        (__aligned_buffer): Use __alignof__ instead of std::alignment_of.
        * include/std/type_traits (alignment_of): Use alignof instead of
        __alignof__.
        * testsuite/20_util/alignment_of/value.cc: Fix test to check values
        match alignof not __alignof__, as required by the standard.

Modified:
    branches/gcc-8-branch/libstdc++-v3/ChangeLog
    branches/gcc-8-branch/libstdc++-v3/include/ext/aligned_buffer.h
    branches/gcc-8-branch/libstdc++-v3/include/std/type_traits
    branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/alignment_of/value.cc

Reply via email to