repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-70265-1.C
blob
e0fcdfeb69383695ae2742027e304fa750ce4687
1
// PR c++/70265
2
// { dg-do compile { target c++14 } }
3
4
constexpr int
5
foo (int p)
6
{
7
int t = 0;
8
while (1) // { dg-error "count exceeds" }
9
;
10
return t;
11
}
12
13
static_assert (foo (1) == 0, ""); // { dg-error "non-constant" }