[Bug c++/54165] New: Cast to "void" should not implicitly call conversion functions
schaub.johannes at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 3 10:59:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54165
Bug #: 54165
Summary: Cast to "void" should not implicitly call conversion
functions
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
GCC should not print "what!?" in the following code, according to the C++ spec
#include <iostream>
struct A {
template<typename T>
operator T() {
std::cout << "what!?";
}
};
int main() {
A a;
(void)a;
}
More information about the Gcc-bugs
mailing list