Mercurial > hg > CbC > CbC_gcc
comparison 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 |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
3 | 3 |
4 constexpr int | 4 constexpr int |
5 foo (int p) | 5 foo (int p) |
6 { | 6 { |
7 int t = 0; | 7 int t = 0; |
8 while (1) | 8 while (1) // { dg-error "count exceeds" } |
9 t = 0; // { dg-error "count exceeds" } | 9 t = 0; |
10 return t; | 10 return t; |
11 } | 11 } |
12 | 12 |
13 static_assert (foo (1) == 0, ""); // { dg-error "non-constant|in .constexpr. expansion of " } | 13 static_assert (foo (1) == 0, ""); // { dg-error "non-constant|in .constexpr. expansion of " } |