[RFC] How to communicate that -Wpedantic controls only certain cases of DiagGroups

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[RFC] How to communicate that -Wpedantic controls only certain cases of DiagGroups

Leonard Chan via cfe-dev
Hello all,

I’ll illustrate the problem with a situation encountered by our user. For some code compiled with -Wpedantic they encountered some -Wextra-semi warnings. So they’ve assumed that -Wpedantic controls -Wextra-semi but documentation doesn’t say so. And it is correct because -Wpedantic enables all extension warnings but not disabled-by-default warnings. And for -Wextra-semi the DiagGroups structure is

ExtraSemi
  ext_extra_semi
  warn_extra_semi_after_mem_fn_def, DefaultIgnore
  CXX98CompatExtraSemi
    warn_cxx98_compat_top_level_semi, DefaultIgnore
  CXX11ExtraSemi
    ext_extra_semi_cxx11

So there are -Wextra-semi warnings that won’t be enabled by -Wpedantic.

I don’t think that Clang users should understand the intricacies of the DiagGroup structure to use it successfully. And provided example shows we don’t always achieve this goal. Does anybody have an idea how we can communicate that -Wpedantic can enable some warnings in certain cases but not in all cases? And should it be the case at all? Maybe it would be better if we don’t mix extension warnings and regular warnings in the same DiagGroup. I don’t suggest to update all the warnings to adhere to this requirement. But it can be useful to pay more attention to this in the future.

Thanks,
Volodymyr

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev