public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ismail at i10z dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/101446] -Wpedantic causes an error with zero size array
Date: Wed, 14 Jul 2021 10:25:02 +0000	[thread overview]
Message-ID: <bug-101446-4-30MOWfl06C@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101446-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101446

--- Comment #7 from İsmail Dönmez <ismail at i10z dot com> ---
Well, it's even more confusing, grepping through glibc build log:

../include/stdlib.h:297:8: warning: ISO C forbids zero-size array 'msg'
[-Wpedantic]
  297 | char msg[0];
      |        ^~~


../inet/netinet/ip6.h:92:21: warning: ISO C forbids zero-size array
'ip6r0_addr' [-Wpedantic]
  92 |     struct in6_addr ip6r0_addr[0];
     |                     ^~~~~~~~~~

So even the zero-size array warning behaves differently.

  parent reply	other threads:[~2021-07-14 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  8:26 [Bug c/101446] New: " ismail at i10z dot com
2021-07-14  9:35 ` [Bug c/101446] " redi at gcc dot gnu.org
2021-07-14  9:40 ` rguenth at gcc dot gnu.org
2021-07-14  9:42 ` ismail at i10z dot com
2021-07-14  9:42 ` rguenth at gcc dot gnu.org
2021-07-14  9:46 ` rguenth at gcc dot gnu.org
2021-07-14  9:47 ` ismail at i10z dot com
2021-07-14 10:25 ` ismail at i10z dot com [this message]
2021-07-14 15:21 ` joseph at codesourcery dot com

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-101446-4-30MOWfl06C@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: 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).