[pypy-dev] gcc warnings / errors in translation

Justin Bogner mail at justinbogner.com
Tue Feb 12 05:57:23 CET 2013


Armin Rigo <arigo at tunes.org> writes:
> Ah, indeed.  We declare most arrays as "itemtype x[1]", so gcc complains
> when it can prove we do accesses at an index > 0.

Is there a good reason not to use the C99 "itemtype x[]" or even the old
GCC extension "itemtype x[0]"? These won't trigger this warning, which
means we could leave it on in case a legitimate case crops up.

As far as I know, the only noticeable difference between [], [0], and
[1] for flexible arrays is that sizeof has different semantics, but
that's usually not a big deal.


More information about the pypy-dev mailing list