From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7E80B384AB74 for ; Tue, 23 Apr 2024 18:53:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E80B384AB74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7E80B384AB74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713898432; cv=none; b=FjA1AeOWfWUhvxsyTn2wnQB0F8EOJNpNjeg9/mbMgxTak2Vx40obBWco+n9wpKS8iC1cKeLH8chheVDsCbjGauBjDoo1yJtPtSv+KH7vSMj1K/zaM0C9um1RwU2mK3YBdGpNQDkOUnS+uXe1XZ357hqYjIRSq62GX/GYrfm5t8o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713898432; c=relaxed/simple; bh=GiJccg91j+RJzyYQuEcxPtLTO7xTKp/vt1woiJl/0cI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=WE3sdHTzWwkT9MNcmOstwAx3xEqRhaxfmrltvkdMofLKAUnFwMb1dpAvE4wY7GFMv3FVHDmhlFTueDWRUjvRhwNplnP4No3lgXG4zms9qC0tC+iHB7w2sxm+pTtXh32e7V7+QSztfOFThAIHOenDtIQ6edco0IbpcmP0L+BSS6Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713898429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tjG3hhfoSThW4wZAva1fEV1r1EnhaiWAIfcfN/2Q4Jo=; b=BoeCpS5dLpc9FIVqTxEMIdoX1vq059f1a59IZbqayumXBH/QULm71/My8o8KIzGQ957W5Q ld0Pd/C0dJE2eQx5+luMOt9/BR416ZbmbS4FFj3hw//DcKIn8Q8dM9EWisGHRXDuvS/RJY CGyFHCQ5CQ6v3SQhfMi5V5Hdxbn+Hsc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-16-ZLlAbwyvM1iJ6KS59lxz_g-1; Tue, 23 Apr 2024 14:53:47 -0400 X-MC-Unique: ZLlAbwyvM1iJ6KS59lxz_g-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-418f18458a0so31527845e9.0 for ; Tue, 23 Apr 2024 11:53:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713898426; x=1714503226; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tjG3hhfoSThW4wZAva1fEV1r1EnhaiWAIfcfN/2Q4Jo=; b=eNex1SdpaxngxM2gUi1UBb+ipOn1kVRxey5R4Etc0zXJkDU9s4xmfy+N1TykEcBEIA 6u4tfN/0bzOzVruy8sscw6Z1Yn0pRqLh6+jGgxOCB9Tx6sUxUHblnpihGx2FMkS/uBzR SmVCZuW1gF7m3tZiqygGKtGyEYqd3xAJrLbvhtgpCSznhNEczppHsIurFac6Clhu60La F587ByktNYI4Q4rYBjbeo9vxzJX8MCWMyDe1HmMmbSNWbUy5g/L7HZCwn0s0vO5xUV16 jhaV6ZENcwORYolMjPKAlizoX5Mfpma7/67fgltLsmJkDUlhKi2u+nOs69f6K+GFgxn+ i47Q== X-Forwarded-Encrypted: i=1; AJvYcCW7KTZSes/VmSvyBcrHzTqGmSHzd75m7Px9NtUfNQu4I2sx15017Kj32xrya1yhM21c5xPVe4L5UmE0GX3yFSowjd6st+IHww== X-Gm-Message-State: AOJu0YzZzPAHFGz4ln8Jp/TpHB/kO2hUAjpsCiy4rYs9UPRJvb8pYPNf AS4as2ksuDeKegL4D+J5OycpLIVpX+IZLj2Nb3ENDeu237FG45a8usU2s5DwFF4ZFnlvhU1ky52 il4nogZZoQglHoBIHmVBnwIG7kUo3zNsG6ztLzkGPTrW4EDaZNvSM2f8= X-Received: by 2002:a05:600c:3b26:b0:418:969b:cb37 with SMTP id m38-20020a05600c3b2600b00418969bcb37mr93399wms.39.1713898426675; Tue, 23 Apr 2024 11:53:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJ3nj6aGsVIFgj614VqOHsOivLA12Dlv6N/JFugtp8qAlwpGRq+YnzRycoShenvhIyXkW1Zw== X-Received: by 2002:a05:600c:3b26:b0:418:969b:cb37 with SMTP id m38-20020a05600c3b2600b00418969bcb37mr93390wms.39.1713898426310; Tue, 23 Apr 2024 11:53:46 -0700 (PDT) Received: from digraph.polyomino.org.uk (digraph.polyomino.org.uk. [2001:8b0:bf73:93f7::51bb:e332]) by smtp.gmail.com with ESMTPSA id bg5-20020a05600c3c8500b00419f419236fsm12786439wmb.41.2024.04.23.11.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 11:53:46 -0700 (PDT) Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.95) (envelope-from ) id 1rzLGy-001weK-IS; Tue, 23 Apr 2024 18:53:44 +0000 Date: Tue, 23 Apr 2024 18:53:44 +0000 (UTC) From: Joseph Myers To: Qing Zhao cc: richard.guenther@gmail.com, uecker@tugraz.at, siddhesh@gotplt.org, keescook@chromium.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. In-Reply-To: <20240419184317.2138890-4-qing.zhao@oracle.com> Message-ID: <3942e676-5f84-a724-58b4-667aa9ad7e@redhat.com> References: <20240419184317.2138890-1-qing.zhao@oracle.com> <20240419184317.2138890-4-qing.zhao@oracle.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. 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. 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. 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. -- Joseph S. Myers josmyers@redhat.com