Bug 56130 - __attribute__((deprecated)) does not affect C++ reference
Summary: __attribute__((deprecated)) does not affect C++ reference
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.2
: P3 normal
Target Milestone: 4.9.0
Assignee: Paolo Carlini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-28 13:15 UTC by chen3feng
Modified: 2013-08-21 19:07 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chen3feng 2013-01-28 13:15:49 UTC
int g_nn;
int& g_n __attribute__((deprecated)) = g_nn;

int main()
{
    g_n = 1;
}

Compile with -Wall
No any warning.
Comment 1 chen3feng 2013-01-28 13:17:52 UTC
Tested on gcc 4.1.2 4.5.3 4.6.3 4.7.2
Comment 2 Paolo Carlini 2013-08-21 12:06:14 UTC
Mine.
Comment 3 Paolo Carlini 2013-08-21 19:07:25 UTC
Fixed for 4.9.0 (r201906)