public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sebor at roguewave dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/31176] reorder class data members to minimize space waste Date: Wed, 14 Mar 2007 19:04:00 -0000 [thread overview] Message-ID: <20070314190420.2049.qmail@sourceware.org> (raw) In-Reply-To: <bug-31176-1186@http.gcc.gnu.org/bugzilla/> ------- Comment #3 from sebor at roguewave dot com 2007-03-14 19:04 ------- (In reply to comment #1) > Interesting. Do the attributes apply to derived classes automatically? I would say no. > [...] > Is D also allowed to reorder members a and b? even with an explicit > __attribute__((reorder))? I'm afraid I don't know enough to give an informed answer but my gut tells me that it might be safer to have the programmer explicitly ask for the base class padding to be used to store members of the derived class (e.g., via some creative application of the attribute in the definition of the derived class) rather than having the compiler do it automatically for them. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31176
next prev parent reply other threads:[~2007-03-14 19:04 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-03-14 17:37 [Bug c++/31176] New: " sebor at roguewave dot com 2007-03-14 18:15 ` [Bug c++/31176] " fang at csl dot cornell dot edu 2007-03-14 18:16 ` pinskia at gcc dot gnu dot org 2007-03-14 19:04 ` sebor at roguewave dot com [this message] 2007-03-14 19:06 ` sebor at roguewave dot com 2007-03-14 19:09 ` pinskia at gcc dot gnu dot org 2007-03-15 19:54 ` sebor at roguewave dot com 2007-03-15 19:55 ` sebor at roguewave dot com 2007-03-15 23:51 ` sebor at roguewave dot com 2007-04-28 0:37 ` pinskia at gcc dot gnu dot org [not found] <bug-31176-4@http.gcc.gnu.org/bugzilla/> 2014-09-03 0:56 ` richard-gccbugzilla at metafoo dot co.uk
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=20070314190420.2049.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).