#pragma align before the declaration
When building in usr/src/uts/sun4u/unix with gcc 4.8.2, the following error appears:
../../common/vm/vm_pagelist.c:77:9: error: '#pragma align' must appear before the declaration of vm_cpu_data0, ignoring [-Werror]
#pragma align MAX_PRAGMA_ALIGN(vm_cpu_data0)
cc1: all warnings being treated as errors
The Studio compiler accepts the code with no complaints, but gcc objects to the placement of the pragma. The solution is to use the aligned attribute for the gcc compiler only. I've attached my patch file.