mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
[gdb] Use using in compat_x32_clock_t typedef
In commit 6c85ef111b ("[gdb] Use using instead of typedef"), I did:
...
-typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t;
+using compat_x32_clock_t = long __attribute__ ((__aligned__ (4)));
...
which I had to revert because clang ignores the attribute in this variant.
Pedro suggested instead using:
...
using compat_x32_clock_t [[gnu::aligned (4)]] = long;
...
which does work with both clang and gcc.
[ Note that it's not a question of how the attribute is worded, this also works:
...
using compat_x32_clock_t __attribute__ ((__aligned__ (4))) = long;
...
It's just a question of where the attribute is placed. ]
Fix this by using Pedro's suggestion.
Suggested-By: Pedro Alves <pedro@palves.net>
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
d30693bea9
commit
b2e06335b1
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ struct compat_siginfo_t
|
|||
};
|
||||
|
||||
/* For x32, clock_t in _sigchld is 64bit aligned at 4 bytes. */
|
||||
typedef long __attribute__ ((__aligned__ (4))) compat_x32_clock_t;
|
||||
using compat_x32_clock_t [[gnu::aligned (4)]] = long;
|
||||
|
||||
struct __attribute__ ((__aligned__ (8))) compat_x32_siginfo_t
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue