public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104699] New: zero-length-array is not considered as an array
@ 2022-02-26 13:58 nickhuang99 at hotmail dot com
  2022-02-26 20:07 ` [Bug c++/104699] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: nickhuang99 at hotmail dot com @ 2022-02-26 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104699
           Summary: zero-length-array is not considered as an array
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nickhuang99 at hotmail dot com
  Target Milestone: ---

GCC clearly states that "declaring zero-length arrays is allowed in GNU C as an
extension".   https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

However, parser rejects to recognize int[0] as an array. i.e.

static_assert(! std::is_array<int[0]>::value);

This is not an issue of library function "is_array". Instead it is the
specialization of "is_array<int[0]>" which is not considered valid.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-01  1:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 13:58 [Bug c++/104699] New: zero-length-array is not considered as an array nickhuang99 at hotmail dot com
2022-02-26 20:07 ` [Bug c++/104699] " redi at gcc dot gnu.org
2022-02-26 21:36 ` nickhuang99 at hotmail dot com
2022-02-28  9:45 ` redi at gcc dot gnu.org
2022-02-28  9:58 ` redi at gcc dot gnu.org
2022-02-28 11:24 ` redi at gcc dot gnu.org
2022-03-01  1:55 ` nickhuang99 at hotmail dot com

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).