public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/53037] New: warn_if_not_aligned(X)
Date: Wed, 18 Apr 2012 22:59:00 -0000	[thread overview]
Message-ID: <bug-53037-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53037

             Bug #: 53037
           Summary: warn_if_not_aligned(X)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


What I'd like to have is an __attribute__((warn_if_not_aligned(X)))
which issues a warning if the object/type/field in question is not
aligned to X.  In particular, I'd like to build with:

typedef unsigned long long __u64
       __attribute__((aligned(4),warn_if_not_aligned(8)));

... in order to get a list of the places where we have misaligned 64-bit
data pieces in x86.  Then we can do Linus' requested cleanups which
ultimately aims to getting __u64 to be __attribute__((aligned(8))) even
on i386, with an explicit __compat_u64 for the places where we need to
be misaligned for legacy reasons.


             reply	other threads:[~2012-04-18 22:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18 22:59 hjl.tools at gmail dot com [this message]
2012-04-19  0:35 ` [Bug c/53037] warn_if_not_aligned(X) hjl.tools at gmail dot com
2012-04-19 15:48 ` hjl.tools at gmail dot com
2012-04-19 15:53 ` hpa at zytor dot com
2012-04-19 16:02 ` hjl.tools at gmail dot com
2012-04-19 16:07 ` hpa at zytor dot com
2012-04-19 16:54 ` hjl.tools at gmail dot com
2012-04-19 16:59 ` hpa at zytor dot com
2012-04-19 17:09 ` hjl.tools at gmail dot com
2012-04-19 17:12 ` hpa at zytor dot com
2012-04-19 17:22 ` hjl.tools at gmail dot com
2012-04-19 17:42 ` hpa at zytor dot com
2012-04-19 20:16 ` hjl.tools at gmail dot com
2012-04-19 20:19 ` hjl.tools at gmail dot com
2012-04-19 20:24 ` hpa at zytor dot com
2012-04-19 20:42 ` hjl.tools at gmail dot com
2012-04-19 21:07 ` hjl.tools at gmail dot com
2013-02-13 10:39 ` paolo.carlini at oracle dot com
2022-03-29  8:16 ` vries at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53037-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).