Project

General

Profile

Bug #5461

#pragma align before the declaration

Added by Gary Mills almost 6 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2014-12-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

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.


Files

page.diff (796 Bytes) page.diff Gary Mills, 2014-12-21 01:51 PM

Related issues

Related to illumos gate - Bug #3062: illumos should build/work with GCC 4.6 or newerNewToomas Soome2012-08-07

Actions

Also available in: Atom PDF