svn commit: r328978 - head/sys/mips/mips
Alex Richardson
arichardson at FreeBSD.org
Wed Feb 7 16:58:02 UTC 2018
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;
More information about the svn-src-all
mailing list