public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "xiaoj at google dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/36566] Cannot bind packed field
Date: Wed, 18 Mar 2015 00:53:00 -0000	[thread overview]
Message-ID: <bug-36566-4-S4vcQ1JyLh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-36566-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566

Xiao Jia <xiaoj at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xiaoj at google dot com

--- Comment #7 from Xiao Jia <xiaoj at google dot com> ---
What is the status of this?

Adding "const" makes it compile.  Is this the intended behavior or not?


struct Squeeze
{
    short   s;
} __attribute__((aligned(1), packed));

void VerticallyChallenged(const short&) {}

int main()
{
    Squeeze oj;
    const short& pit(oj.s);
    VerticallyChallenged(pit);
    VerticallyChallenged(oj.s);
}


  parent reply	other threads:[~2015-03-18  0:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-36566-4@http.gcc.gnu.org/bugzilla/>
2013-09-13  4:14 ` structurechart at yahoo dot com
2013-09-14 23:08 ` gabriel at teuton dot org
2015-03-18  0:53 ` xiaoj at google dot com [this message]
2015-03-18  1:56 ` redi at gcc dot gnu.org
2021-12-31 15:11 ` steve+gcc at tecwec dot eu
2008-06-18 18:28 [Bug c++/36566] New: " nevin at eviloverlord dot com
2008-06-18 18:31 ` [Bug c++/36566] " pinskia at gcc dot gnu dot org
2008-06-18 18:49 ` nevin at eviloverlord dot com
2008-06-18 19:06 ` nevin at eviloverlord dot com
2009-10-11  4:38 ` gabriel at teuton dot 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-36566-4-S4vcQ1JyLh@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).