public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lauro dot venancio at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
Date: Mon, 03 Dec 2007 23:42:00 -0000	[thread overview]
Message-ID: <20071203234243.8120.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28865-10135@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from lauro dot venancio at gmail dot com  2007-12-03 23:42 -------
I think I'm facing a related problem. GCC is emitting unaligned array elements. 

struct ccstm {
        int32_t val;
        const char descr[];
};

static const struct ccstm canon_d30custom[] = {
  { 1, "Long exposure noise reduction" },
  { 2, "Shutter/AE lock buttons" },
  { 3, "Mirror lockup" }
};

produces this assembly for arm-linux-gnueabi:

.align 2
canon_d30custom:
.word 1
.ascii "Long exposure noise reduction\000"
.word 2
.ascii "Shutter/AE lock buttons\000"
.word 3
.ascii "Mirror lockup\000"

Note that the second and the third array element are unaligned.


-- 

lauro dot venancio at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lauro dot venancio at gmail
                   |                            |dot com


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


  parent reply	other threads:[~2007-12-03 23:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-27 21:53 [Bug c/28865] New: " qrczak at knm dot org dot pl
2006-08-27 22:15 ` [Bug middle-end/28865] " qrczak at knm dot org dot pl
2006-08-28  3:08 ` pinskia at gcc dot gnu dot org
2007-12-03 23:42 ` lauro dot venancio at gmail dot com [this message]
     [not found] <bug-28865-4@http.gcc.gnu.org/bugzilla/>
2013-04-08 21:57 ` pinskia at gcc dot gnu.org
2013-04-08 21:57 ` pinskia at gcc dot gnu.org
2013-04-08 22:39 ` hjl.tools at gmail dot com
2013-04-20  9:54 ` schwab@linux-m68k.org
2013-05-04 14:34 ` amodra at gmail dot com
2013-05-04 14:39 ` amodra at gmail dot com
2014-01-09 20:09 ` jakub at gcc dot gnu.org
2014-01-09 20:09 ` jakub at gcc dot gnu.org
2014-01-09 20:09 ` jakub at gcc dot gnu.org
2014-01-09 20:10 ` bergner at gcc dot gnu.org
2014-01-10 16:53 ` nickc at gcc dot gnu.org
2014-01-10 22:51 ` amodra at gmail dot com
2014-01-10 23:13 ` amodra at gmail dot com
2014-01-13 11:43 ` amodra at gmail dot com
2014-01-13 11:52 ` jakub at gcc dot gnu.org
2014-01-13 16:03 ` joseph at codesourcery dot com
2014-01-13 16:47 ` jakub at gcc dot gnu.org
2014-01-13 17:47 ` nickc at gcc dot gnu.org
2014-01-14 11:58 ` amodra at gmail dot com
2014-01-16 12:18 ` nickc at gcc dot gnu.org
2014-01-16 12:19 ` nickc 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=20071203234243.8120.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: 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).