diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-29 04:55:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-04-29 04:55:46 +0000 |
commit | 3d0b7546132a9a667122e457b3baec4cd03947e0 (patch) | |
tree | 26fdd9041deb9ccd4c2fbc8faadfa3e424b510ea /docs/ReleaseNotes.rst | |
parent | fc26ba15dd3d6c4e30e868b08110d9d87a21107a (diff) | |
download | clang-3d0b7546132a9a667122e457b3baec4cd03947e0.tar.gz |
PR37275 packed attribute should not apply to base classes
Clang incorrectly applied the packed attribute to base classes. Per GCC's
documentation and as can be observed from its behavior, packed only applies to
members, not base classes.
This change is conditioned behind -fclang-abi-compat so that an ABI break can
be avoided by users if desired.
Differential Revision: https://reviews.llvm.org/D46218
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r-- | docs/ReleaseNotes.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 6efc98f3c8..b6672bdbfd 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -78,6 +78,12 @@ Non-comprehensive list of changes in this release standard-layout if all base classes and the first data member (or bit-field) can be laid out at offset zero. +- Clang's handling of the GCC ``packed`` class attribute in C++ has been fixed + to apply only to non-static data members and not to base classes. This fixes + an ABI difference between Clang and GCC, but creates an ABI difference between + Clang 7 and earlier versions. The old behavior can be restored by setting + ``-fclang-abi-compat`` to ``6`` or earlier. + - ... New Compiler Flags |