[wwwdocs] Mention flexible array type and mangling change
Martin Sebor
msebor@gmail.com
Thu Feb 11 21:17:00 GMT 2016
>> 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>
+
<h2>-Wmisleading-indentation</h2>
<p>
A new warning <code>-Wmisleading-indentation</code> was added
More information about the Gcc-patches
mailing list