[cfe-dev] -Warray-bounds seems over-zealous on Clang
peter at 2ndquadrant.com
Wed Jul 13 04:46:20 PDT 2011
On 13 July 2011 12:06, Titus von Boxberg <titus at v9g.de> wrote:
> A small meta comment:
> Your complaints would be less annyoing to read if you'd
> stop using cheap rhetorical tricks like displaying your use case
> as "sane", "reasonable", representing the "vast majority", etc.;
> and others as "paranoid", "burdened with passing additional compiler flags"
> (WOW! that's something I have to remember as a nifty excuse for the next time the
> delivery date is missed! Sorry, I was so burdened passing all the additional
> compiler flags, really, I couldn't make it!
> sorry, I'm using cheap rhetorical tricks ;-),
> "gross", "unhygienic" etc.
> But, alas!, speaking as a "paranoid avionics engineer", being expected
> to happily carry the compiler flag burden home with me, I can only recommend being
> compliant with latest language standards, in this case C99.
> Shouldn't be too bad for postgresql to target a now
> already aging standard.
> Also the software I'm working on suffered some from some non-standard
> extensions that we took as granted, but were marked as an error or were
> given a warning by clang.
> So, I did not see an argument why using the "unhygienic" suggestion
> of C99 variable length arrays isn't viable; if MS cl.exe does not support
> this (which I don't know), I'd see this as an insufficient standards
> implementation and regard this as the problem of this compiler, not of clang.
Please stop putting words in my mouth. I never called anything
unhygienic. Any of the adjectives I used were my opinion. I really
don't see how you could consider that a cheap rhetorical trick. If
you'd like me to demonstrate that I represent a large segment of
people by taking issue with the way Clang currently deals with this,
I'd be happy to. I consider that unnecessary though, as it has already
been acknowledged by Chris and Chandler.
It would be nice if we could move to C99; I'd be the first to support
such a move, if it was practical. It is not practical for highly
portable software such as PostgreSQL to move to C99, probably for more
reasons than MSVC compatibility, although we do already use some
widely supported C99 features. Uptake of C99 just hasn't been what I'm
sure we'd all like it to be. Pretending that this isn't the case isn't
going to help C99's cause, or Clang's.
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
More information about the cfe-dev