Date: Wed, 7 Feb 2018 16:58:01 +0000 (UTC) From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328978 - head/sys/mips/mips Message-ID: <201802071658.w17Gw18a098291@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arichardson Date: Wed Feb 7 16:58:01 2018 New Revision: 328978 URL: https://svnweb.freebsd.org/changeset/base/328978 Log: Fix compilation of mips_postboot_fixup() with a C11 compiler The _Alignas specifier must come before the declaration and not after. It works if _Alignas() expands to __attribute__(aligned(x)) which was the only case I tested before. Approved By: jhb (mentor) Modified: head/sys/mips/mips/machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Wed Feb 7 16:57:10 2018 (r328977) +++ head/sys/mips/mips/machdep.c Wed Feb 7 16:58:01 2018 (r328978) @@ -387,7 +387,7 @@ mips_postboot_fixup(void) * We store u_long sized objects into the reload area, so the array * must be so aligned. The standard allows any alignment for char data. */ - static char fake_preload[256] _Alignas(_Alignof(u_long)); + _Alignas(_Alignof(u_long)) static char fake_preload[256]; caddr_t preload_ptr = (caddr_t)&fake_preload[0]; size_t size = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802071658.w17Gw18a098291>