public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107175] New: overloaded resolution has a bug incase of deleted functions
@ 2022-10-06 20:05 physhivam at gmail dot com
2022-10-06 20:11 ` [Bug c++/107175] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: physhivam at gmail dot com @ 2022-10-06 20:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107175
Bug ID: 107175
Summary: overloaded resolution has a bug incase of deleted
functions
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: physhivam at gmail dot com
Target Milestone: ---
Hey, I was trying to build clang's libcxx on my ubuntu 22.04 and it has
gcc-11.2 by default most prolly, but while building libcxx there was an error
about using the deleted function but it seems that overloaded resolution in
gcc-11 has a bug
namespace N {
struct S {};
void func(S);
}
namespace ADL {
void func() = delete;
}
template <class T>
void call_func(T t) {
using ADL::func;
func(t);
}
int main() {
call_func(N::S{});
}
error:
<source>: In instantiation of 'void call_func(T) [with T = N::S]':
<source>:18:12: required from here
<source>:14:7: error: use of deleted function 'void ADL::func()'
14 | func(t);
| ~~~~^~~
<source>:8:8: note: declared here
8 | void func() = delete;
| ^~~~
Compiler returned: 1
https://godbolt.org/z/GPTPYaobb , it consider wrong overloaded function ,
although the bug is fixed in the most recent version but I guess this needs to
be backport in the previous version where gcc starts support for c++11, as many
of the previous versions are the default versions on several machines.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/107175] overloaded resolution has a bug incase of deleted functions
2022-10-06 20:05 [Bug c++/107175] New: overloaded resolution has a bug incase of deleted functions physhivam at gmail dot com
@ 2022-10-06 20:11 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-06 20:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107175
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 68942.
Since it was not a regression the patch which fixes this is 99% sure will not
be backported into GCC 11.x or GCC 10.x.
*** This bug has been marked as a duplicate of bug 68942 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-06 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 20:05 [Bug c++/107175] New: overloaded resolution has a bug incase of deleted functions physhivam at gmail dot com
2022-10-06 20:11 ` [Bug c++/107175] " pinskia 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).