From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id BDF6E3857C68 for ; Thu, 16 Jul 2020 16:13:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BDF6E3857C68 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-479-7vwYloxTP_K-RA1rn1Nqpg-1; Thu, 16 Jul 2020 12:13:30 -0400 X-MC-Unique: 7vwYloxTP_K-RA1rn1Nqpg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B3658800464 for ; Thu, 16 Jul 2020 16:13:29 +0000 (UTC) Received: from pdp-11.redhat.com (ovpn-114-26.rdu2.redhat.com [10.10.114.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 765BC19C4F for ; Thu, 16 Jul 2020 16:13:29 +0000 (UTC) From: Marek Polacek To: GCC Patches Subject: [committed] c++: Add test for DR 188. Date: Thu, 16 Jul 2020 12:13:23 -0400 Message-Id: <20200716161323.768809-1-polacek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-15.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2020 16:13:33 -0000 Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: DR 188 * g++.dg/DRs/dr188.C: New test. --- gcc/testsuite/g++.dg/DRs/dr188.C | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 gcc/testsuite/g++.dg/DRs/dr188.C diff --git a/gcc/testsuite/g++.dg/DRs/dr188.C b/gcc/testsuite/g++.dg/DRs/dr188.C new file mode 100644 index 00000000000..f29a9eba1c9 --- /dev/null +++ b/gcc/testsuite/g++.dg/DRs/dr188.C @@ -0,0 +1,7 @@ +// DR 188 +// { dg-do compile { target c++11 } } +// From [diff.expr]p5. + +char arr[100]; +// Yields 100 in C++ and sizeof(char*) in C. +static_assert (sizeof (0, arr) == 100, ""); base-commit: a4f49061b6d921f72b2faf4843144f3c75f828f7 -- 2.26.2