aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-12-15 12:30:36 +0100
committerTom de Vries <tdevries@suse.de>2022-12-15 12:30:36 +0100
commit9066e0c72bb98e8182ae682239e67b23e2f17289 (patch)
treec17e7691502b447ffcd4702c783c9b9718365cc9
parent9c71ba0dc4f4ad7ab7e5f7711be6e7fde6118a06 (diff)
downloadgdb-9066e0c72bb98e8182ae682239e67b23e2f17289.zip
gdb-9066e0c72bb98e8182ae682239e67b23e2f17289.tar.gz
gdb-9066e0c72bb98e8182ae682239e67b23e2f17289.tar.bz2
[gdb/testsuite] Fix gdb.base/condbreak-multi-context.exp with gcc 4.8.5
With gcc 4.8.5, I run into: ... Running gdb.base/condbreak-multi-context.exp ... gdb compile failed, condbreak-multi-context.cc:21:11: warning: non-static \ data member initializers only available with -std=c++11 or -std=gnu++11 \ [enabled by default] int b = 20; ^ ... Fix this by making it a static const. Tested on x86_64-linux, with gcc 4.8.5, 7.5.0 and clang 13.0.1.
-rw-r--r--gdb/testsuite/gdb.base/condbreak-multi-context.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.base/condbreak-multi-context.cc b/gdb/testsuite/gdb.base/condbreak-multi-context.cc
index 0192478..914c003 100644
--- a/gdb/testsuite/gdb.base/condbreak-multi-context.cc
+++ b/gdb/testsuite/gdb.base/condbreak-multi-context.cc
@@ -18,7 +18,7 @@
class Base
{
public:
- int b = 20;
+ static const int b = 20;
void func () {}
};
@@ -26,7 +26,7 @@ public:
class A : public Base
{
public:
- int a = 10;
+ static const int a = 10;
void func () {}
};
@@ -34,7 +34,7 @@ public:
class C : public Base
{
public:
- int c = 30;
+ static const int c = 30;
void func () {}
};