From a54d71cb664199c98fbb2694e9314566d6ca0ed2 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 16 Jul 2020 12:11:25 -0400 Subject: [PATCH] c++: Add test for DR 188. 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, ""); -- 2.30.2