* [committed] c++: Add test for DR 188.
@ 2020-07-16 16:13 Marek Polacek
0 siblings, 0 replies; only message in thread
From: Marek Polacek @ 2020-07-16 16:13 UTC (permalink / raw)
To: GCC Patches
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-16 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 16:13 [committed] c++: Add test for DR 188 Marek Polacek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).