http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56130
Bug #: 56130 Summary: __attribute__((deprecated)) does not affect C++ reference Classification: Unclassified Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: chen3f...@gmail.com int g_nn; int& g_n __attribute__((deprecated)) = g_nn; int main() { g_n = 1; } Compile with -Wall No any warning.