Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix placement of alignas() specifier #186

Merged
merged 2 commits into from Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Fix placement of alignas() specifier
The alignment specifier must appear before the typename

i.e. clang9 refused to compile

uint8_t alignas(MAX_ALIGN) __reserved[128];

but accepted

alignas(MAX_ALIGN) uint8_t __reserved[128];
  • Loading branch information
sdmaclea committed Jun 11, 2020
commit e72fe5376e7084017d8f56ecdfea3d4766e5e3fb
2 changes: 1 addition & 1 deletion include/libunwind-aarch64.h
Expand Up @@ -194,7 +194,7 @@ struct unw_sigcontext
uint64_t sp;
uint64_t pc;
uint64_t pstate;
uint8_t alignas(16) __reserved[(66 * 8)];
alignas(16) uint8_t __reserved[(66 * 8)];
};

typedef struct
Expand Down
2 changes: 1 addition & 1 deletion include/unwind.h
Expand Up @@ -77,7 +77,7 @@ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action,
even on 32-bit machines for gcc compatibility. */
struct _Unwind_Exception
{
uint64_t alignas(8) exception_class;
alignas(8) uint64_t exception_class;
_Unwind_Exception_Cleanup_Fn exception_cleanup;
unsigned long private_1;
unsigned long private_2;
Expand Down
2 changes: 1 addition & 1 deletion src/mi/mempool.c
Expand Up @@ -41,7 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
# define MAX_ALIGN MAX_ALIGN_(sizeof (long double))
#endif

static char alignas(MAX_ALIGN) sos_memory[SOS_MEMORY_SIZE];
static alignas(MAX_ALIGN) char sos_memory[SOS_MEMORY_SIZE];
static _Atomic size_t sos_memory_freepos = 0;
static size_t pg_size;

Expand Down