This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>,Joseph Myers <joseph at codesourcery dot com>
- Cc: Jason Merrill <jason at redhat dot com>,Ulrich Weigand <uweigand at de dot ibm dot com>,GCC Patches <gcc-patches at gcc dot gnu dot org>,Jakub Jelinek <jakub at redhat dot com>,Richard Biener <richard dot guenther at gmail dot com>,Markus Trippelsdorf <markus at trippelsdorf dot de>
- Date: Wed, 16 Mar 2016 10:45:54 +0100
- Subject: Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOrx2TKEnBsSzCkB6eB33FjsaFoyKqx68D=jgNzxjhNHng at mail dot gmail dot com> <20160302162538 dot 66068C88E at oc7340732750 dot ibm dot com> <CAMe9rOqF-B-he1JWaxq5++1a75vKtpECRAgcMDd+EbjdxQzLdQ at mail dot gmail dot com> <56E82BC4 dot 7070401 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1603152138570 dot 17533 at digraph dot polyomino dot org dot uk> <CAMe9rOq-EmEDSOvo-ycJ2PkZZyupcLVbTpEumKMAfQos2=8TKw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1603152233290 dot 17533 at digraph dot polyomino dot org dot uk> <CAMe9rOoVmuEZC8tK7Bqg5gMdsCxXxJqsjNc6WZ1fvrxogSSvyg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1603160024540 dot 17533 at digraph dot polyomino dot org dot uk> <CAMe9rOqG6yKifyNtFnYDyjnCubVJbfFyefMZ7xdew6pFpDFOfw at mail dot gmail dot com>
On March 16, 2016 3:17:20 AM GMT+01:00, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>> Where is the current definition of empty types you're proposing for
>use in
>> GCC? Is the behavior of this case clear from that definition?
>
>https://gcc.gnu.org/ml/gcc/2016-03/msg00071.html
>
>Jason's patch follows it. Here is a test for struct with zero-size
>array of empty type, which is treated as empty type.
index 0000000..489eb3a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/empty19.C
@@ -0,0 +1,17 @@
+// PR c++/60336
+// { dg-do run }
+// { dg-options "-Wabi=9 -x c" }
+// { dg-additional-sources "empty14a.c" }
14a ? Not 19a ?
Thanks