Skip to content

Commit be10744

Browse files
Collect pending Changes entries for 2026-10-28 []
1 parent 3b4ad49 commit be10744

2 files changed

Lines changed: 25 additions & 23 deletions

File tree

‎src/Changes‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
Version 7.1
22

3+
10/28/26 [GH #400]
4+
Order of destruction of array elements in constant evaluation
5+
6+
During constant evaluation, the elements of an array (including an array
7+
member and an array destroyed by a delete[] expression) were destroyed in
8+
increasing order of their index instead of in decreasing order. For
9+
example, with --c++20:
10+
11+
struct S {
12+
int* log;
13+
int id;
14+
constexpr ~S() { *log = *log * 10 + id; }
15+
};
16+
constexpr int f() {
17+
int log = 0;
18+
{
19+
S a[3] = {{&log, 1}, {&log, 2}, {&log, 3}};
20+
}
21+
return log;
22+
}
23+
static_assert(f() == 321); // Previously failed.
24+
25+
This is now fixed.
26+
27+
328
10/27/26 [GH #325]
429
GNU/Clang compatibility: argument checking for arithmetic overflow builtins
530

‎src/pending_changes/gh-400-array-destruction-order.txt‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)