This patch adds -Waddress-of-packed-member to GCC 9 porting guide.
OK to install?
Thanks.
H.J.
---
Index: gcc-9/porting_to.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/porting_to.html,v
retrieving revision 1.1
diff -u -r1.1 porting_to.html
--- gcc-9/porting_to.html 11 Jan 2019 18:21:45 -0000 1.1
+++ gcc-9/porting_to.html 14 Jan 2019 13:46:07 -0000
@@ -56,13 +56,36 @@
}
</code></pre>
+<h2 id="c/cxx">C/C++ language issues</h2>
+
+<h3 id="Waddress-of-packed-member"><code>-Waddress-of-packed-member</code>
+is enabled by default</h3>
+
+<p>
+ When address of packed member of struct or union is taken, it may result
+ in an unaligned pointer value. A new warning
+ <code>-Waddress-of-packed-member</code> was added to check alignment at
+ pointer assignment. It warns both unaligned address and unaligned
+ pointer.
+</p>
+
+<p>
+ If the pointer value is safe to use, you can suppress
+ <code>-Waddress-of-packed-member</code> warnings by using pragmas:
+</p>
+ <pre><code>
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Waddress-of-packed-member"
+ /* (code for which the warning is to be disabled) */
+ #pragma GCC diagnostic pop
+ </code></pre>
+
<!--
<h2 id="cxx">C++ language issues</h2>
-->
<!--
<h2 id="fortran">Fortran language issues</h2>
--->
<!--
<h2 id="links">Links</h2>