Project

General

Profile

Actions

Bug #2732

closed

consistent use of #pragma align would please GCC

Added by Rich Lowe over 11 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2012-05-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

Right now, we patch GCC to accept #pragma align after a declaration, as well as before. It's not a big patch, and it makes it more consistent with studio but, given that there's only really about 4 places in which we actually do this, and all of them are trivial to fix, it's easy enough to fix our code.


Files

palign.patch (2.87 KB) palign.patch Richard PALO, 2014-09-20 04:24 PM
Actions #1

Updated by Rich Lowe over 11 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
Actions #2

Updated by Richard PALO about 9 years ago

Actually, from what I see in the gate today, there is only one file actually needing therapy:
usr/src/uts/i86pc/io/fipe/fipe_pm.c

The attached patch should deal with that.

(the initial file list to check wasn't even half a page!)

Actions #3

Updated by Rich Lowe about 9 years ago

So, I should have updated this bug and didn't.

The reason I never fixed this is that it turned out that while studio accepted a "late" pragma align, it didn't actually do anything with it. My notes say I intended to double check whether we wanted the behaviour the code appeared to specify, or the behaviour the compiler actually gave us.

I appear to have done neither.

I think, on balance, that what Richard has done is the right thing to do. I just wanted to make sure I noted this in the bug (as I should have done at the time).

Actions #4

Updated by Richard PALO almost 9 years ago

Is this waiting on me to prepare a webrev?
I've been running with this patch now since 20/09/2014 without issue.

Actions #5

Updated by Rich Lowe almost 9 years ago

Yes.

Actions #6

Updated by Electric Monk almost 9 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

git commit 90b1de135fcfa7ce4adc9138a885aa94bbcef04f

commit  90b1de135fcfa7ce4adc9138a885aa94bbcef04f
Author: Richard PALO <richard@NetBSD.org>
Date:   2014-12-01T16:29:56.000Z

    2732 consistent use of #pragma align would please GCC
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF