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: unassig...@gcc.gnu.org ReportedBy: schaub.johan...@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; }