public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Andrew Haley <aph@redhat.com>
Cc: Dave Korn <dave.korn.cygwin@googlemail.com>,
	     "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: What does zero-length array mean at file scope?
Date: Thu, 28 May 2009 22:48:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0905282059490.24872@digraph.polyomino.org.uk> (raw)
In-Reply-To: <4A1922B0.9090209@redhat.com>

On Sun, 24 May 2009, Andrew Haley wrote:

> Of course we have to fix the assembler output.  For ant two declarations
> a and b, &a != &b, even when a is a zero-length array.  So, you have to
> allocate at least one byte.

I don't think this is necessarily part of the semantics for the GNU 
extensions of zero-length arrays and empty structures.  Certainly when 
they are used in the middle of a structure they are not expected to take 
up any space (so their address may be the same as that of the next 
member).

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2009-05-28 21:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24  9:07 Dave Korn
2009-05-24  9:21 ` Dave Korn
2009-05-24  9:26   ` Dave Korn
2009-05-24 10:34     ` Andrew Haley
2009-05-24 10:57       ` Dave Korn
2009-05-24 12:03         ` Andrew Haley
2009-05-24 12:29           ` Dave Korn
2009-05-24 12:41             ` Dave Korn
2009-05-24 20:57               ` Andrew Haley
2009-05-24 22:51                 ` Dave Korn
2009-05-28 22:48           ` Joseph S. Myers [this message]
2009-05-28 23:18             ` Dave Korn
2009-05-29 10:17             ` Andrew Haley
2009-05-28 22:45 ` Joseph S. Myers
2009-05-29  9:04   ` Dave Korn
2009-05-24  9:47 Uros Bizjak

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=Pine.LNX.4.64.0905282059490.24872@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=aph@redhat.com \
    --cc=dave.korn.cygwin@googlemail.com \
    --cc=gcc@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).