This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [PATCH] Add __array_size keyword


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]