From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45053 invoked by alias); 15 Mar 2016 22:35:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 44820 invoked by uid 89); 15 Mar 2016 22:35:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:803 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 15 Mar 2016 22:35:04 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1afxYL-0001Io-3x from joseph_myers@mentor.com ; Tue, 15 Mar 2016 15:35:01 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Tue, 15 Mar 2016 22:34:59 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.82) (envelope-from ) id 1afxYI-0006o9-J5; Tue, 15 Mar 2016 22:34:58 +0000 Date: Tue, 15 Mar 2016 22:35:00 -0000 From: Joseph Myers To: "H.J. Lu" CC: Jason Merrill , Ulrich Weigand , GCC Patches , Jakub Jelinek , Richard Biener , Markus Trippelsdorf Subject: Re: PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class In-Reply-To: Message-ID: References: <20160302162538.66068C88E@oc7340732750.ibm.com> <56E82BC4.7070401@redhat.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2016-03/txt/msg00864.txt.bz2 On Tue, 15 Mar 2016, H.J. Lu wrote: > On Tue, Mar 15, 2016 at 2:39 PM, Joseph Myers wrote: > > I'm not sure if the zero-size arrays (a GNU extension) are considered to > > make a struct non-empty, but in any case I think the tests should cover > > such arrays as elements of structs. > > There are couple tests for structs with members of array > of empty types. testsuite/g++.dg/abi/empty14.h has My concern is the other way round - structs with elements such as "int a[0];", an array [0] of a nonempty type. My reading of the subobject definition is that such an array should not cause the struct to be considered nonempty (it doesn't result in any int subobjects). -- Joseph S. Myers joseph@codesourcery.com