diff mbox

PING^4 [PATCH, GCC 5] PR 70613, -fabi-version docs don't match implementation

Message ID CABXYE2X-JbVLL96iMc_etpQxPXAePvaH5fBODCtCrMFYxFLTbg@mail.gmail.com
State Superseded
Headers show

Commit Message

Jim Wilson May 9, 2016, 11:21 p.m. UTC
On Mon, May 2, 2016 at 12:13 PM, Jim Wilson <jim.wilson@linaro.org> wrote:
> Here is a patch to correct the -fabi-version docs on the GCC 5 branch.

> https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00480.html


Maybe I didn't put enough info in the email the first 3 times?

You can see the default -fabi-version in gcc/c-family/c-opts.c on the
gcc-5 branch which has

  /* Change flag_abi_version to be the actual current ABI level for the
     benefit of c_cpp_builtins.  */
  if (flag_abi_version == 0)
    flag_abi_version = 9;

You can see in the docs that -fabi-version only goes up to 8.
    https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options

As for how we got here...
I see that the patch for bug 65945 was back ported to the gcc-5
branch, which required a partial backport of the patch for bug 44282,
which added abi version 9.  The original patch for 44282 is missing
the doc change.

The missing doc change was then added here
    https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=228017
which has the invoke.texi hunk we need, but is missing a ChangeLog
entry for it.  So it appears all we need is a partial backport of this
invoke.texi hunk.  This is mostly documenting a change to -Wabi, so we
only need parts of two hunks that document -fabi-version=9 and mention
gcc-5.2.

The patch is attached again.

Jim
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 234867)
+++ ChangeLog	(working copy)
@@ -1,3 +1,12 @@ 
+2016-04-11  Jim Wilson  <jim.wilson@linaro.org>
+
+	Partial backport from trunk r228017.
+	2015-09-22  Jason Merrill  <jason@redhat.com>
+
+	PR c++/70613
+	* doc/invoke.texi (-fabi-version): Document version 9.
+	(-Wabi): Document version 9.  Mention version 8 is default for GCC 5.1.
+
 2016-04-09  Oleg Endo  <olegendo@gcc.gnu.org>
 
 	Backport from mainline
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 234867)
+++ doc/invoke.texi	(working copy)
@@ -2118,6 +2118,9 @@  scope.
 Version 8, which first appeared in G++ 4.9, corrects the substitution
 behavior of function types with function-cv-qualifiers.
 
+Version 9, which first appeared in G++ 5.2, corrects the alignment of
+@code{nullptr_t}.
+
 See also @option{-Wabi}.
 
 @item -fabi-compat-version=@var{n}
@@ -2619,7 +2622,15 @@  When mangling a function type with function-cv-qua
 un-qualified function type was incorrectly treated as a substitution
 candidate.
 
-This was fixed in @option{-fabi-version=8}.
+This was fixed in @option{-fabi-version=8}, the default for GCC 5.1.
+
+@item
+@code{decltype(nullptr)} incorrectly had an alignment of 1, leading to
+unaligned accesses.  Note that this did not affect the ABI of a
+function with a @code{nullptr_t} parameter, as parameters have a
+minimum alignment.
+
+This was fixed in @option{-fabi-version=9}, the default for GCC 5.2.
 @end itemize
 
 It also warns about psABI-related changes.  The known psABI changes at this