This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] Mention flexible array type and mangling change
- From: Marek Polacek <polacek at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Jonathan Wakely <jwakely at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Feb 2016 15:41:45 +0100
- Subject: Re: [wwwdocs] Mention flexible array type and mangling change
- Authentication-results: sourceware.org; auth=none
- References: <20160211142000 dot GB3163 at redhat dot com> <20160211152613 dot GR8441 at redhat dot com> <20160211163958 dot GC3163 at redhat dot com> <56BCC03F dot 5000904 at gmail dot com> <20160211175933 dot GE3163 at redhat dot com> <56BCD6D1 dot 5050101 at gmail dot com> <20160211185114 dot GG3163 at redhat dot com> <56BCF0E1 dot 10905 at gmail dot com> <20160211204306 dot GI3163 at redhat dot com> <56BCFA77 dot 9090300 at gmail dot com>
On Thu, Feb 11, 2016 at 02:17:43PM -0700, Martin Sebor wrote:
> >>Actually, there is one other thing that might be wort mentioning
> >>about flexible array members.
> >>
> >>The type and mangling of flexible array members has changed. While
> >>in GCC 5 and prior the type of a flexible array member is an array
> >>of zero elements (a GCC extension), in 6 it is that of an array of
> >>an unspecified bound (i.e., T[] as opposed to T[0]). This is
> >>a silent ABI change with no -fabi-version/-Wabi option.
> >
> >Aha. I think you're better-suited to document this than I am.
>
> Sure. Here's the added text. Please let me know if it's good to
> check in.
>
> Martin
>
>
> Index: htdocs/gcc-6/porting_to.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/porting_to.html,v
> retrieving revision 1.12
> diff -u -r1.12 porting_to.html
> --- htdocs/gcc-6/porting_to.html 11 Feb 2016 18:56:15 -0000 1.12
> +++ htdocs/gcc-6/porting_to.html 11 Feb 2016 21:15:30 -0000
> @@ -315,6 +315,15 @@
> };
> </code></pre>
>
> +<p>
> +Finally, the type and mangling of flexible array members has changed
> +from previous releases. While in GCC 5 and prior the type of a flexible
> +array member is an array of zero elements (a GCC extension), in GCC 6 it
> +is that of an array of an unspecified bound (i.e., <tt>T[]</tt> as opposed
> +to <tt>T[0]</tt>). This is a silent ABI change with no corresponding
> +<tt>-fabi-version</tt> or <tt>-Wabi</tt> option to disable or warn about.
> +</p>
> +
This seems ok to me, thanks.
Marek