This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] [PATCH] Add __array_size keyword
- From: Marek Polacek <polacek at redhat dot com>
- To: Stuart Brady <sdb-gcc at zubnet dot me dot uk>
- Cc: Joseph Myers <joseph at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 Feb 2016 15:05:36 +0100
- Subject: Re: [RFC] [PATCH] Add __array_size keyword
- Authentication-results: sourceware.org; auth=none
- References: <20160211200534 dot GA545 at zubnet dot me dot uk> <alpine dot DEB dot 2 dot 10 dot 1602112229460 dot 23611 at digraph dot polyomino dot org dot uk> <20160213031649 dot GA465 at zubnet dot me dot uk>
On Sat, Feb 13, 2016 at 03:16:49AM +0000, Stuart Brady wrote:
> As a brief aside, I do get an ICE with the following source, without any
> modifications of my own:
>
> int bar() { return foo(); }
> void baz(int c[foo()]) { return; }
>
> I will look into submitting a PR for this properly soon, but will not
> mind if someone wants to take this task upon themselves instead,
> especially as we are into the release phase for GCC 6 and this may be
> an issue worth fixing. (Note that Debian's GCC 5.3.1 is also affected.)
Sure, I've just filed this:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69824
> For a hypothetical change to the C standard itself, I think one might use
> the name "_ArraySize", but for a non-standard extension this would not be
> appropriate. I think "__array_size" is fine, though, and is consistent
> with "__alignof".
Please no CamelCase, that's ugly ;). I also think that "__array_size" is fine.
(I haven't had time so far to read the patch.)
Marek