Is -Werror=pedantic necessary?
Christopher James Halse Rogers
raof at ubuntu.com
Thu Nov 14 23:14:19 UTC 2013
Just a quick one, but one that might generate lots of discussion: should
we be building with -Werror=pedantic? What does this buy us?
It *costs* us things like C99 designated-initialisers, which are nice.
As far as I can tell from the gcc manpage, -pedantic doesn't produce
errors for code where it's likely that the behaviour intended by the
programmer doesn't match the actual behaviour (ie: it doesn't seem like
it will help catch coding errors). -pedantic *explicitly* doesn't
provide a guarantee that code that builds with -pedantic set will build
on another ISO C++-compliant compiler, and we already get most of that
benefit by building with clang anyway.
This message brought to you by my latest build failing again because of
the use of C99 designated-initialisers where they're obviously
(If it turns out that we do get value from -Werror=pedantic; great! I
can refer back to the message next time I get annoyed at not being able
to use sensible features ☺).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: This is a digitally signed message part
More information about the Mir-devel