From: Dave Korn <dave.korn.cygwin@googlemail.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: Sun, 24 May 2009 22:51:00 -0000 [thread overview]
Message-ID: <4A194D6C.5030705@gmail.com> (raw)
In-Reply-To: <4A194614.2040401@redhat.com>
Andrew Haley wrote:
>>> Obviously I can't see for looking; can you please point me to the precise
>>> chapter/page/paragraph/line that I should have found earlier?
>
> "Zero-length arrays are allowed in GNU C. They are very useful as the
> last element of a structure ..."
>
> That doesn't in any way imply that the last element of a struct is the only
> circumstance in which you may use a zero-length array.
*boggle* Yes, I must have been tired! I repeatedly scanned that as
"Zero-length arrays are allowed in GNU C [ ... eyes or perhaps brain go blurry
about here ... ] as the last element of a structure which is really a header
for a variable-length object"
> Yes. That's what is usually done: all you have to do is fix the back end.
:) Just to be helpful, I added a few extra words to the documentation for
ASM_OUTPUT_COMMON in my revised patch.
http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01545.html
cheers,
DaveK
next prev parent reply other threads:[~2009-05-24 13:25 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 [this message]
2009-05-28 22:48 ` Joseph S. Myers
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=4A194D6C.5030705@gmail.com \
--to=dave.korn.cygwin@googlemail.com \
--cc=aph@redhat.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).