| commit | 57ebc9901305133000100fa7764dac94b4208a3b | [log] [tgz] |
|---|---|---|
| author | Tom Tromey <tromey@adacore.com> | Tue May 10 08:47:34 2022 -0600 |
| committer | Tom Tromey <tromey@adacore.com> | Thu Jun 02 09:04:44 2022 -0600 |
| tree | 5a8d3b13fdbab88d466f19c1e8ac58ca83b19aaa | |
| parent | 2e90d0257855fa4661f2da67033286958632ed55 [diff] |
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