aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-05-10 08:47:34 -0600
committerTom Tromey <tromey@adacore.com>2022-06-02 09:04:44 -0600
commit57ebc9901305133000100fa7764dac94b4208a3b (patch)
tree5a8d3b13fdbab88d466f19c1e8ac58ca83b19aaa /gdb
parent2e90d0257855fa4661f2da67033286958632ed55 (diff)
downloadgdb-57ebc9901305133000100fa7764dac94b4208a3b.zip
gdb-57ebc9901305133000100fa7764dac94b4208a3b.tar.gz
gdb-57ebc9901305133000100fa7764dac94b4208a3b.tar.bz2
Fix ODR warning in observable.h
observable.h triggers an ODR warning because this line: extern observable<struct target_ops */* target */> target_changed; ... may be the only declaration of "struct target_ops" in scope (depending on the particular .c file) -- and this declares it in a namespace, resulting in confusion. This patch fixes the problem by adding a forward declaration. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Diffstat (limited to 'gdb')
-rw-r--r--gdb/observable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/observable.h b/gdb/observable.h
index f426c1a..796bf2a 100644
--- a/gdb/observable.h
+++ b/gdb/observable.h
@@ -28,6 +28,7 @@ struct objfile;
struct thread_info;
struct inferior;
struct process_stratum_target;
+struct target_ops;
struct trace_state_variable;
namespace gdb