public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: gcc-patches@gcc.gnu.org
Cc: rguenther@suse.de, jakub@redhat.com, msebor@gmail.com,
	keescook@chromium.org, joseph@codesourcery.com,
	Qing Zhao <qing.zhao@oracle.com>
Subject: [GCC13][Patch][V4][PATCH 0/2] Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836
Date: Wed,  7 Sep 2022 00:28:15 +0000	[thread overview]
Message-ID: <20220907002817.236178-1-qing.zhao@oracle.com> (raw)

This is the 4th version of the patch set.
Compare to the 3rd version, the following are the major change:

1. delete all the warnings for the confliction between -std and
-fstrict-flex-arrays per our discussion.
2. delete all the related testing cases for these warnings.
3. update all the wording changes, and documentation format changes
recommanded by Joseph.
I have bootstrapped and regression tested on both aarch64 and x86, no issues.

Let me know if you have any comments on the patches.

thanks.

Qing Zhao (2):
  Add a new option -fstrict-flex-arrays[=n] and new attribute
    strict_flex_arrays
  Use array_at_struct_end_p in __builtin_object_size [PR101836]

 gcc/c-family/c-attribs.cc                  |  47 ++++++++
 gcc/c-family/c.opt                         |   7 ++
 gcc/c/c-decl.cc                            | 130 +++++++++++++++++++--
 gcc/cp/module.cc                           |   2 +
 gcc/doc/extend.texi                        |  25 ++++
 gcc/doc/invoke.texi                        |  27 ++++-
 gcc/print-tree.cc                          |   8 +-
 gcc/testsuite/g++.dg/strict-flex-array-1.C |  31 +++++
 gcc/testsuite/gcc.dg/pr101836.c            |  60 ++++++++++
 gcc/testsuite/gcc.dg/pr101836_1.c          |  60 ++++++++++
 gcc/testsuite/gcc.dg/pr101836_2.c          |  60 ++++++++++
 gcc/testsuite/gcc.dg/pr101836_3.c          |  60 ++++++++++
 gcc/testsuite/gcc.dg/pr101836_4.c          |  60 ++++++++++
 gcc/testsuite/gcc.dg/pr101836_5.c          |  60 ++++++++++
 gcc/testsuite/gcc.dg/strict-flex-array-1.c |  31 +++++
 gcc/testsuite/gcc.dg/strict-flex-array-2.c |  60 ++++++++++
 gcc/testsuite/gcc.dg/strict-flex-array-3.c |  60 ++++++++++
 gcc/tree-core.h                            |   5 +-
 gcc/tree-object-size.cc                    |  16 ++-
 gcc/tree-streamer-in.cc                    |   1 +
 gcc/tree-streamer-out.cc                   |   1 +
 gcc/tree.cc                                |  45 +++++--
 gcc/tree.h                                 |  14 ++-
 23 files changed, 833 insertions(+), 37 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/strict-flex-array-1.C
 create mode 100644 gcc/testsuite/gcc.dg/pr101836.c
 create mode 100644 gcc/testsuite/gcc.dg/pr101836_1.c
 create mode 100644 gcc/testsuite/gcc.dg/pr101836_2.c
 create mode 100644 gcc/testsuite/gcc.dg/pr101836_3.c
 create mode 100644 gcc/testsuite/gcc.dg/pr101836_4.c
 create mode 100644 gcc/testsuite/gcc.dg/pr101836_5.c
 create mode 100644 gcc/testsuite/gcc.dg/strict-flex-array-1.c
 create mode 100644 gcc/testsuite/gcc.dg/strict-flex-array-2.c
 create mode 100644 gcc/testsuite/gcc.dg/strict-flex-array-3.c

-- 
2.31.1


             reply	other threads:[~2022-09-07  0:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  0:28 Qing Zhao [this message]
2022-09-07  0:28 ` [GCC13][Patch][V4][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_arrays Qing Zhao
2022-09-12 16:42   ` Martin Sebor
2022-09-28 19:17     ` Qing Zhao
2022-09-30 17:39       ` Martin Sebor
2022-10-03 15:20         ` Qing Zhao
2022-09-07  0:28 ` [GCC13][Patch][V4][PATCH 2/2] Use array_at_struct_end_p in __builtin_object_size [PR101836] 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=20220907002817.236178-1-qing.zhao@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=keescook@chromium.org \
    --cc=msebor@gmail.com \
    --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).