Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1y/constexpr-70265-2.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/70265 |
2 // { dg-do compile { target c++14 } } | |
3 | |
4 constexpr int | |
5 foo (int p) | |
6 { | |
7 int t = 0; | |
145 | 8 while (1) // { dg-error "count exceeds" } |
9 t = 0; | |
111 | 10 return t; |
11 } | |
12 | |
131 | 13 static_assert (foo (1) == 0, ""); // { dg-error "non-constant|in .constexpr. expansion of " } |