On 10/08/2016 17:24, Manuel López-Ibáñez wrote: > Perhaps we need something like -Wextra-pedantic, for things that are > undefined by ISO C but defined by GNU. Thus, they would not trigger > pedwarns and no error with -pedantic-errors.
I think this is overengineering it a bit. If they are annoying, put them in -Wpedantic; if they aren't too bad, put them in Wextra. There is also the case (which includes -Wshift-negative-value) of things that are undefined by ISO C and trapped by ubsan, but defined by GNU C. Actually are pedwarns even necessary nowadays? In theory they fall in two categories: - stuff that is EnabledBy(Wpedantic) automatically gets bumped from warning to error by -pedantic-errors or (I think) -Werror=pedantic; - stuff that is not enabled by anything should use OPT_Wpedantic, and then warning(OPT_Wpedantic) should have the same effect as pedwarn(OPT_Wpedantic). Are there other cases that I'm missing? Paolo