public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning
@ 2022-03-01 11:57 albert.astals.cid at kdab dot com
2022-03-03 23:47 ` [Bug c++/104734] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: albert.astals.cid at kdab dot com @ 2022-03-01 11:57 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104734] -isystem hides -Woverloaded-virtual warning
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
@ 2022-03-03 23:47 ` pinskia at gcc dot gnu.org
2022-03-09 9:22 ` albert.astals.cid at kdab dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-03-03 23:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Last reconfirmed| |2022-03-03
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you attach the preprocesed source for both cases?
You can get it via -save-temps option added.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104734] -isystem hides -Woverloaded-virtual warning
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
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
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: albert.astals.cid at kdab dot com @ 2022-03-09 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734
--- Comment #2 from Albert Astals Cid <albert.astals.cid at kdab dot com> ---
Created attachment 52589
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52589&action=edit
preprocessed source with -isystem
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104734] -isystem hides -Woverloaded-virtual warning
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: albert.astals.cid at kdab dot com @ 2022-03-09 9:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734
--- Comment #3 from Albert Astals Cid <albert.astals.cid at kdab dot com> ---
Created attachment 52590
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52590&action=edit
preprocessed source with -I
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104734] -isystem hides -Woverloaded-virtual warning
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: albert.astals.cid at kdab dot com @ 2022-03-09 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734
--- Comment #4 from Albert Astals Cid <albert.astals.cid at kdab dot com> ---
Added both the pre-processed source with both -isystem and -I
They seem mostly the same except some ¿annotations/comments?
Had to compress them with xz since otherwise they were too big to attach, hope
that's OK.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104734] -isystem hides -Woverloaded-virtual warning
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: albert.astals.cid at kdab dot com @ 2022-03-16 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734
--- Comment #5 from Albert Astals Cid <albert.astals.cid at kdab dot com> ---
Ping
I provided the requested information, can someone move this out of WAITING
state?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104734] -isystem hides -Woverloaded-virtual warning
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
` (4 preceding siblings ...)
2022-03-16 8:46 ` albert.astals.cid at kdab dot com
@ 2022-03-16 9:51 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-03-16 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104734
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
Ever confirmed|1 |0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-16 9:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 11:57 [Bug c++/104734] New: -isystem hides -Woverloaded-virtual warning albert.astals.cid at kdab dot com
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
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).