Disabling GCC's -Woverloaded-virtual

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Disabling GCC's -Woverloaded-virtual

Vassil Vassilev via cfe-dev
This warning isn't a GCC default, it's turned on in clang/CMakeLists.txt (but not enabled for LLVM). This dates back to at least 2008 so I'm not sure if the reasons still apply.

It has false positives by design that can't be silenced without (IMO) making the code worse. Clang's version of the same warning doesn't have this problem.

I've got https://reviews.llvm.org/D82617 which will make us enable it for clang only, also happy to drop it entirely and let people who want it turn it on.

Just wanted to check if anyone felt strongly about it, since I don't really know who should review such a change.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Disabling GCC's -Woverloaded-virtual

Vassil Vassilev via cfe-dev
Followed up on the review - but I do kind of see the value in the GCC
slice of the warning, that hiding some functions provided by a base
class is probably unintended & could result in confusion  (or subtle
bugs if the overload set can still compile with some overloads
missing).

On Fri, Jun 26, 2020 at 2:34 AM Sam McCall via cfe-dev
<[hidden email]> wrote:

>
> This warning isn't a GCC default, it's turned on in clang/CMakeLists.txt (but not enabled for LLVM). This dates back to at least 2008 so I'm not sure if the reasons still apply.
>
> It has false positives by design that can't be silenced without (IMO) making the code worse. Clang's version of the same warning doesn't have this problem.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423
>
> I've got https://reviews.llvm.org/D82617 which will make us enable it for clang only, also happy to drop it entirely and let people who want it turn it on.
>
> Just wanted to check if anyone felt strongly about it, since I don't really know who should review such a change.
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev