public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "albert.astals.cid at kdab dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning Date: Tue, 01 Mar 2022 11:57:08 +0000 [thread overview] Message-ID: <bug-104734-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734 Bug ID: 104734 Summary: -isystem hides -Woverloaded-virtual warning Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: albert.astals.cid at kdab dot com Target Milestone: --- I have a class that inherits from a class that is a system header. The system header class has virtual bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event); my class has bool edit(const QModelIndex &index, int editDay); when compiling with -I to add include paths i get In file included from /usr/include/qt/QtWidgets/qtreeview.h:44, from /usr/include/qt/QtWidgets/QTreeView:1, from /home/tsdgeos/kdab/private/KDABViewer/Widgets/TimelineWidget.h:4, from /home/tsdgeos/kdab/private/KDABViewer/Widgets/TimelineWidget.cpp:1: /usr/include/qt/QtWidgets/qabstractitemview.h:297:18: warning: ‘virtual bool QAbstractItemView::edit(const QModelIndex&, QAbstractItemView::EditTrigger, QEvent*)’ was hidden [-Woverloaded-virtual] 297 | virtual bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event); | ^~~~ In file included from /home/tsdgeos/kdab/private/KDABViewer/Widgets/TimelineWidget.cpp:1: /home/tsdgeos/kdab/private/KDABViewer/Widgets/TimelineWidget.h:66:10: note: by ‘bool TimelineWidget::edit(const QModelIndex&, int)’ 66 | bool edit(const QModelIndex &index, int editDay); | ^~~~ but if instead of -I i use -isystem the warning is gone. This feels wrong since the warning is about my code, not about the system include code.
next reply other threads:[~2022-03-01 11:57 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-01 11:57 albert.astals.cid at kdab dot com [this message] 2022-03-03 23:47 ` [Bug c++/104734] " pinskia at gcc dot gnu.org 2022-03-09 9:22 ` albert.astals.cid at kdab dot com 2022-03-09 9:22 ` albert.astals.cid at kdab dot com 2022-03-09 9:23 ` albert.astals.cid at kdab dot com 2022-03-16 8:46 ` albert.astals.cid at kdab dot com 2022-03-16 9:51 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104734-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).