public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: richard Biener <rguenther@suse.de>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>
Subject: gcc-13/changes.html: Mention -fstrict-flex-arrays and its impact
Date: Tue, 20 Dec 2022 16:16:30 +0000	[thread overview]
Message-ID: <FF9C7E0B-5DF6-4FC2-B3C2-29F3CBCBE147@oracle.com> (raw)

Hi,

This is the patch for mentioning -fstrict-flex-arrays and -Warray-bounds=2 changes in gcc-13/changes.html.

Let me know if you have any comment or suggestions.

Thanks.

Qing.

=======================================
From c022076169b4f1990b91f7daf4cc52c6c5535228 Mon Sep 17 00:00:00 2001
From: Qing Zhao <qing.zhao@oracle.com>
Date: Tue, 20 Dec 2022 16:13:04 +0000
Subject: [PATCH] gcc-13/changes: Mention -fstrict-flex-arrays and its impact.

---
 htdocs/gcc-13/changes.html | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html
index 689178f9..47b3d40f 100644
--- a/htdocs/gcc-13/changes.html
+++ b/htdocs/gcc-13/changes.html
@@ -39,6 +39,10 @@ a work-in-progress.</p>
     <li>Legacy debug info compression option <code>-gz=zlib-gnu</code> was removed
       and the option is ignored right now.</li>
     <li>New debug info compression option value <code>-gz=zstd</code> has been added.</li>
+    <li><code>-Warray-bounds=2</code> will no longer issue warnings for out of bounds
+      accesses to trailing struct members of one-element array type anymore. Please
+      add <code>-fstrict-flex-arrays=level</code> to control how the compiler treat
+      trailing arrays of structures as flexible array members. </li>
 </ul>
 
 
@@ -409,6 +413,17 @@ a work-in-progress.</p>
 <h2>Other significant improvements</h2>
 
 <!-- <h3 id="uninitialized">Eliminating uninitialized variables</h3> -->
+<h3 id="flexible array">Treating trailing arrays as flexible array members</h3>
+
+<ul>
+ <li>GCC can now control when to treat the trailing array of a structure as a 
+     flexible array member for the purpose of accessing the elements of such
+     an array. By default, all trailing arrays of structures are treated as 
+     flexible array members. Use the new command-line option
+     <code>-fstrict-flex-array=level</code> to control how GCC treats the trailing
+     array of a structure as a flexible array member at different levels.
+ </li>
+</ul>
 
 <!-- .................................................................. -->
 <!-- <h2 id="13.1">GCC 13.1</h2> -->
-- 
2.31.1



             reply	other threads:[~2022-12-20 16:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 16:16 Qing Zhao [this message]
2022-12-21  7:12 ` Richard Biener
2022-12-21 14:46   ` Qing Zhao
2022-12-22  7:09     ` Richard Biener
2022-12-22 16:41       ` Qing Zhao
2023-01-09  7:11         ` Richard Biener
2023-01-09 15:07           ` Qing Zhao
2023-01-10  8:06             ` Richard Biener
2023-01-10 13:25               ` Qing Zhao
2023-01-13 20:59 ` Gerald Pfeifer
2023-01-17 15:55   ` Qing Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FF9C7E0B-5DF6-4FC2-B3C2-29F3CBCBE147@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).