[Bug c++/87357] New: Bogus conversion with conversion function not detected
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 18 23:48:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87357
Bug ID: 87357
Summary: Bogus conversion with conversion function not detected
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
[class.conv.fct]:
A conversion function is never used to convert a (possibly cv-qualified) object
to the (possibly cv-qualified) same object type (or a reference to it), to a
(possibly cv-qualified) base class of that type (or a reference to it), or to
(possibly cv-qualified) void.
But:
$ cat q.C
struct X {
operator X();
};
$ ./cc1plus -quiet q.C -Wconversion -Wall -Wextra -Wpedantic
More information about the Gcc-bugs
mailing list