diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-05-07 06:43:30 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-05-07 06:43:30 +0000 |
commit | 87b40e16d7ac3126b4a35f918e6c3c8067f1dfa4 (patch) | |
tree | 03281512d80f031854c61b8111613563f331270a /docs/ReleaseNotes.rst | |
parent | 85ba0ebee1bb4c1f88787be717a73da8099f8f24 (diff) |
Non-zero-length bit-fields make a class non-empty.
This implements the rule intended by the standard (see LWG 2358)
and the rule intended by the Itanium C++ ABI (see
https://github.com/itanium-cxx-abi/cxx-abi/pull/51), and makes
Clang match the behavior of GCC, ICC, and MSVC.
A pedantic reading of both the standard and the ABI indicate that Clang
is currently technically correct, but that's not worth much when it's
clear that the wording is wrong in both those places.
This is an ABI break for classes that derive from a class that is empty
other than one or more unnamed non-zero-length bit-fields. Such cases
are expected to be rare, but -fclang-abi-compat=6 restores the old
behavior just in case.
Differential Revision: https://reviews.llvm.org/D45174
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/ReleaseNotes.rst')
-rw-r--r-- | docs/ReleaseNotes.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index ba7898ba33..0f63e8bddf 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -84,6 +84,15 @@ Non-comprehensive list of changes in this release Clang 7 and earlier versions. The old behavior can be restored by setting ``-fclang-abi-compat`` to ``6`` or earlier. +- Clang implements the proposed resolution of LWG issue 2358, along with the + `corresponding change to the Itanium C++ ABI + <https://github.com/itanium-cxx-abi/cxx-abi/pull/51>`_, which make classes + containing only unnamed non-zero-length bit-fields be considered non-empty. + This is an ABI break compared to prior Clang releases, but makes Clang + generate code that is ABI-compatible with other compilers. The old + behavior can be restored by setting ``-fclang-abi-compat`` to ``6`` or + lower. + - ... New Compiler Flags |