[binutils-gdb] [gdb/build, clang] Fix ignored aligned attribute
Tom de Vries via Gdb-cvs <[email protected]> Fri, 12 Jun 2026 10:41:13 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8b752803cf57408cfb7a50bc77a3cbc658f7ad23 commit 8b752803cf57408cfb7a50bc77a3cbc658f7ad23 Author: Tom de Vries <[email protected]> Date: Fri Jun 12 12:41:08 2026 +0200 [gdb/build, clang] Fix ignored aligned attribute PR build/34279 reports a build failure with clang. This is a regression since commit 6c85ef111b0 ("[gdb] Use using instead of typedef"), which did: ... -typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t; +using compat_x32_clock_t = long __attribute__ ((__aligned__ (4))); ... The problem is that clang ignores the attribute. Fix this by reverting this part of the commit. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34279 Diff: --- gdb/nat/amd64-linux-siginfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/nat/amd64-linux-siginfo.c b/gdb/nat/amd64-linux-siginfo.c index 8f1e4acc47e..99faccabf37 100644 --- a/gdb/nat/amd64-linux-siginfo.c +++ b/gdb/nat/amd64-linux-siginfo.c @@ -203,7 +203,7 @@ struct compat_siginfo_t }; /* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes. */ -using compat_x32_clock_t = long __attribute__ ((__aligned__ (4))); +typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t; struct __attribute__ ((__aligned__ (8))) compat_x32_siginfo_t {