public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vagran.ast at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60336] empty struct value is passed differently in C and C++ Date: Wed, 13 Aug 2014 05:05:00 -0000 [thread overview] Message-ID: <bug-60336-4-XrGz7enoq3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-60336-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336 --- Comment #24 from vagran <vagran.ast at gmail dot com> --- Just to be on a safe side, please, also do not forget that empty struct (or class) is really zero in the case when another structure (or class) is derived from it. For example, such test would be useful after fix: struct A {}; struct B: A { int i; }; assert(sizeof(B) == sizeof(int)); And something like this: struct A {}; struct B: A {}; struct C: B {}; struct D: C {}; assert(sizeof(D) == 1);
prev parent reply other threads:[~2014-08-13 5:05 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-02-25 9:36 [Bug other/60336] New: va_start corrupts 6-th argument in case of empty type used before the format string ahanins at gmail dot com 2014-02-25 19:53 ` [Bug other/60336] " mikpelinux at gmail dot com 2014-02-25 21:41 ` [Bug c++/60336] " hjl.tools at gmail dot com 2014-02-25 22:35 ` [Bug target/60336] " pinskia at gcc dot gnu.org 2014-02-26 17:03 ` [Bug target/60336] empty struct value is passed differently in C and C++ hjl.tools at gmail dot com 2014-02-26 18:09 ` ubizjak at gmail dot com 2014-02-26 19:06 ` hjl.tools at gmail dot com 2014-02-26 19:25 ` vagran.ast at gmail dot com 2014-02-26 19:31 ` pinskia at gcc dot gnu.org 2014-02-26 19:32 ` hjl.tools at gmail dot com 2014-02-26 19:51 ` glisse at gcc dot gnu.org 2014-02-26 19:55 ` hjl.tools at gmail dot com 2014-02-27 14:37 ` jason at gcc dot gnu.org 2014-02-27 16:04 ` hjl.tools at gmail dot com 2014-02-27 16:17 ` ubizjak at gmail dot com 2014-02-27 17:58 ` jason at gcc dot gnu.org 2014-02-27 18:41 ` jason at gcc dot gnu.org 2014-02-27 20:53 ` ubizjak at gmail dot com 2014-02-27 21:21 ` pinskia at gcc dot gnu.org 2014-08-12 19:21 ` [Bug c++/60336] " hjl.tools at gmail dot com 2014-08-12 22:58 ` pinskia at gcc dot gnu.org 2014-08-13 5:05 ` vagran.ast at gmail dot com [this message]
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-60336-4-XrGz7enoq3@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: 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).