/////////////////////////// struct Foo { operator int() __attribute__((deprecated)); };
int main() { Foo f; (int)f; } /////////////////////////// gives: warning: `operator 1' is deprecated In real code the '1' is often a bigger number. -- Summary: bad warning with implicit conversion and __attribute__((deprecated)) Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: joerg dot richter at pdv-fs dot de CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17947