[cfe-dev] -Warray-bounds seems over-zealous on Clang

Peter Geoghegan peter at 2ndquadrant.com
Wed Jul 20 03:42:02 PDT 2011

On 20 July 2011 10:48, Chandler Carruth <chandlerc at google.com> wrote:
>> So, is there any chance of getting Nicola's patch committed in some form?
> I'm planning to look at this tomorrow.


I urge you to take a pragmatic view when considering when a warning
should still be displayed. I really don't think you'll be doing
affected developers any favours by showing a "consider flexible
arrays" warning when C99 is used - in most cases, given the reality of
how slow the adoption of C99 has been, you'll just be hectoring them
rather than telling them something that they didn't know. I'd have a
lot more sympathy for the view that such a warning should be seen if
C99 wasn't Clang's default way of building C, but it is.

The reality is that most C projects are using C89 with various very
common extensions that made it into C99. I think that Clang should do
what is most useful for the largest number of people, even if that
comes at the expense of an ivory tower notion of correctness.

I'm sorry if some people disliked how I expressed my views on this
issue - I felt strongly that Clang should go a certain way, and so
used correspondingly strong language. I really just want the best
outcome for both Clang and PostgreSQL.

Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

More information about the cfe-dev mailing list