This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39219] New: attribute deprecated doesn't work with enums
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2009 19:09:14 -0000
- Subject: [Bug c++/39219] New: attribute deprecated doesn't work with enums
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
According to the documentation:
The deprecated attribute results in a warning if the type is used anywhere
in the source file.
The following test case shows that when applied to an enum definition the
attribute has no such effect (this is in contrast to applying the attribute
to a class definition where it does have the expected effect):
$ cat -n u.cpp && g++ -dumpversion && g++ -W -Wall -Werror -c u.cpp; echo $?
1 enum __attribute__ ((deprecated)) E { e };
2 struct S { enum __attribute__ ((deprecated)) F { f = e }; };
3
4 int main () {
5 E x;
6 x = e;
7
8 S::F y;
9 y = S::f;
10
11 return x + y;
12 }
4.3.1
0
--
Summary: attribute deprecated doesn't work with enums
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219