diff options
| author | Andrew Burgess <aburgess@redhat.com> | 2026-02-12 18:22:50 +0000 |
|---|---|---|
| committer | Andrew Burgess <aburgess@redhat.com> | 2026-02-19 10:43:37 +0000 |
| commit | 120072c7cdc14f2e6e2ca1fe4a8eb5bec9e6e36b (patch) | |
| tree | f28fbfc5972ccaa7accf9e613eda04d77268d35e /sim/bfin | |
| parent | 13a7a6aa0d18e1faced5d3b88ab81fa6f95e845f (diff) | |
| download | gdb-master.zip gdb-master.tar.gz gdb-master.tar.bz2 | |
I ran the testsuite on a machine where the C++ compiler was C++20 by
default, and noticed a bunch of errors like this:
gdb compile failed, /tmp/BUILD/gdb-17.1-build/gdb-17.1/gdb/testsuite/gdb.base/infcall-nested-structs.c: In function 'void breakpt()':
/tmp/BUILD/gdb-17.1-build/gdb-17.1/gdb/testsuite/gdb.base/infcall-nested-structs.c:414:3: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
414 | v++;
| ^
UNRESOLVED: gdb.base/infcall-nested-structs-c++.exp: types-tl: failed to compile
My understanding is that, in C++20, some operations on volatile
variables are now deprecated. So things like:
volatile int var = 0;
++var;
--var
var += 1;
var -= 1;
Are now, I believe, all deprecated. However, this is still allowed:
var = var + 1;
There are a few test cases where this impacts us, though in every case
the increment of the volatile only existed in order to create filler
work, as far as I can tell the volatile variable is never inspected
from GDB.
In gdb.base/infcall-nested-structs.c I just deleted the volatile
completely.
In the other tests I replaced the '++' with 'var = var + 1' type code.
I don't believe there should be any change in what is actually being
tested after this patch.
Diffstat (limited to 'sim/bfin')
0 files changed, 0 insertions, 0 deletions
