public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "nevin at eviloverlord dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/36566] Cannot bind packed field Date: Wed, 18 Jun 2008 19:06:00 -0000 [thread overview] Message-ID: <20080618190602.16916.qmail@sourceware.org> (raw) In-Reply-To: <bug-36566-16349@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 689 bytes --] ------- Comment #3 from nevin at eviloverlord dot com 2008-06-18 19:06 ------- Expanding on my last comment: which lines in the following code should fail to compile: struct Squeeze { short s; } __attribute__((aligned(1), packed)); void VerticallyChallenged(short*) {} void VerticallyChallenged(short&) {} int main() { Squeeze oj; short& pit(oj.s); short* ppit(&oj.s); VerticallyChallenged(ppit); // okay VerticallyChallenged(&oj.s); // okay VerticallyChallenged(pit); // okay VerticallyChallenged(oj.s); // cannot bind packed field oj.Squeeze::s to short int& } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566
next prev parent reply other threads:[~2008-06-18 19:06 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 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 [this message] 2009-10-11 4:38 ` gabriel at teuton dot org [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 2015-03-18 1:56 ` redi at gcc dot gnu.org 2021-12-31 15:11 ` steve+gcc at tecwec dot eu
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=20080618190602.16916.qmail@sourceware.org \ --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: linkBe 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).