public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Qing Zhao <qing.zhao@oracle.com>
To: Joseph Myers <josmyers@redhat.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
	"uecker@tugraz.at" <uecker@tugraz.at>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>,
	Kees Cook <keescook@chromium.org>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [RFC][PATCH v1 3/4] Add testing cases for flexible array members in unions and alone in structures.
Date: Tue, 23 Apr 2024 19:30:32 +0000	[thread overview]
Message-ID: <72CA23E7-85F3-441C-A9E3-8278F3E3F920@oracle.com> (raw)
In-Reply-To: <3942e676-5f84-a724-58b4-667aa9ad7e@redhat.com>



> On Apr 23, 2024, at 14:53, Joseph Myers <josmyers@redhat.com> wrote:
> 
> On Fri, 19 Apr 2024, Qing Zhao wrote:
> 
>> gcc/testsuite/ChangeLog:
>> 
>> 	* gcc.dg/flex-array-in-union-1.c: New test.
>> 	* gcc.dg/flex-array-in-union-2.c: New test.
> 
> There should also be a -pedantic-errors test that these constructs get 
> errors with -pedantic-errors.

Okay, will add. 
> 
> The tests mix two cases: flexible arrays in unions, and flexible arrays on 
> their own in structures.  That means the test names are misleading; either 
> they should be renamed, or the struct tests should be split out.
Okay, will update this.
> 
> Note that "no named members" also includes the case where there are 
> unnamed bit-fields together with a flexible array member, so that should 
> be tested as well.
Will add such testing cases.
> 
> Since this patch series involves changes for both C and C++, it would be 
> best for the tests to be c-c++-common tests.  But if that's problematic 
> for some reason - if there's still too much difference in behavior between 
> C and C++ - then there should at least be tests for C++ that are as 
> similar as possible to the tests for C.

I tried to put these two testing cases to c-c++-common, there were some inconsistent behavior 
I cannot resolve at that time, I will try to fix those issue or add C++ testing cases. 

Thanks for the review.

Qing
> 
> -- 
> Joseph S. Myers
> josmyers@redhat.com
> 


  reply	other threads:[~2024-04-23 19:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 18:43 [RFC][PATCH v1 0/4] Allow flexible array members in unions and alone in structures [PR53548] Qing Zhao
2024-04-19 18:43 ` [RFC][PATCH v1 1/4] Documentation change Qing Zhao
2024-04-19 20:54   ` Tom Tromey
2024-04-22 13:28     ` Qing Zhao
2024-04-23 18:04   ` Joseph Myers
2024-04-23 18:21     ` Qing Zhao
2024-04-23 19:03       ` Joseph Myers
2024-04-23 19:21         ` Qing Zhao
2024-04-19 18:43 ` [RFC][PATCH v1 2/4] C and C++ FE changes to support flexible array members in unions and alone in structures Qing Zhao
2024-04-23 19:51   ` Joseph Myers
2024-04-23 19:58     ` Qing Zhao
2024-04-19 18:43 ` [RFC][PATCH v1 3/4] Add testing cases for " Qing Zhao
2024-04-23 18:53   ` Joseph Myers
2024-04-23 19:30     ` Qing Zhao [this message]
2024-04-19 18:43 ` [RFC][PATCH v1 4/4] Adjust testcases for flexible array member in union and alone in structure extension Qing Zhao
2024-04-19 21:55 ` [RFC][PATCH v1 0/4] Allow flexible array members in unions and alone in structures [PR53548] Kees Cook

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=72CA23E7-85F3-441C-A9E3-8278F3E3F920@oracle.com \
    --to=qing.zhao@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=josmyers@redhat.com \
    --cc=keescook@chromium.org \
    --cc=richard.guenther@gmail.com \
    --cc=siddhesh@gotplt.org \
    --cc=uecker@tugraz.at \
    /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).