c++: Add test for DR 188.

gcc/testsuite/ChangeLog:

	DR 188
	* g++.dg/DRs/dr188.C: New test.
This commit is contained in:
Marek Polacek 2020-07-16 12:11:25 -04:00
parent a4f49061b6
commit a54d71cb66
1 changed files with 7 additions and 0 deletions

View File

@ -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, "");