[PATCH] D50805: [Sema] Don't warn on returning the address of a label

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 09:15:12 PDT 2018


lebedev.ri requested changes to this revision.
lebedev.ri added a comment.
This revision now requires changes to proceed.

In https://reviews.llvm.org/D50805#1202578, @Meinersbur wrote:

> In https://reviews.llvm.org/D50805#1201956, @Quuxplusone wrote:
>
> > If you added a new option `-Wret-addr-label` as suggested above (for a total patch of +2 lines), then is it accurate to say:
> >
> > - if `-Wret-addr-label` was enabled by default, we know of at least one codebase that would pass `-Wno-ret-addr-label` to their build
> > - if `-Wret-addr-label` was disabled by default, we don't know of any codebases that would voluntarily enable it And if nobody would enable it voluntarily... might as well eliminate it, right?
>
>
> That nobody here can name a project that would enable it, does not mean that there is none, or that projects will decide in the future to use it, or that individual developers temporarily use. Besides, it'd be enabled by `-Weverything`.


+1 i **strongly** believe this should just be adding a new diag group, not completely dropping the diagnostic.


Repository:
  rC Clang

https://reviews.llvm.org/D50805





More information about the cfe-commits mailing list