When building with clang 11, I get:
CXX sparc64-tdep.o
/home/smarchi/src/binutils-gdb/gdb/sparc64-tdep.c:89:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Werror,-Wnon-c-typedef-for-linkage]
typedef struct
^
adi_stat_t
/home/smarchi/src/binutils-gdb/gdb/sparc64-tdep.c:103:16: note: type is not C-compatible due to this default member initializer
int tag_fd = 0;
^
/home/smarchi/src/binutils-gdb/gdb/sparc64-tdep.c:111:3: note: type is given name 'adi_stat_t' for linkage purposes by this typedef declaration
} adi_stat_t;
^
The typedef is not needed in C++ anyway, just remove them.
gdb/ChangeLog:
* sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
(sparc64_adi_info): Likewise.
+2020-05-15 Simon Marchi <simon.marchi@efficios.com>
+
+ * sparc64-tdep.c (adi_stat_t): Remove typedef (leaving struct).
+ (sparc64_adi_info): Likewise.
+
2020-05-15 Tom Tromey <tom@tromey.com>
* symtab.c (lookup_language_this, lookup_symbol_aux): Use
static struct cmd_list_element *sparc64adilist = NULL;
/* ADI stat settings. */
-typedef struct
+struct adi_stat_t
{
/* The ADI block size. */
unsigned long blksize;
/* ADI is available. */
bool is_avail = false;
-} adi_stat_t;
+};
/* Per-process ADI stat info. */
-typedef struct sparc64_adi_info
+struct sparc64_adi_info
{
sparc64_adi_info (pid_t pid_)
: pid (pid_)
/* The ADI stat. */
adi_stat_t stat = {};
-} sparc64_adi_info;
+};
static std::forward_list<sparc64_adi_info> adi_proc_list;