------- Comment #4 from sebor at roguewave dot com 2009-02-17 21:00 -------
Thanks for looking into so quickly!
In addition to the missing warnings mentioned in the initial report I would
expect a warning for each of the references to e below (i.e., on lines 3, 9,
and 15), analogously to those already issued:
$ cat -n u.cpp && g++ -W -Wall -Werror -c u.cpp; echo $?
1 struct A {
2 enum __attribute__ ((deprecated)) E { e };
3 enum F { f = e }; // missing warning
4 static const E g = e; // missing warning
5 };
6
7 struct B {
8 enum E { e } __attribute__ ((deprecated));
9 enum F { f = e }; // missing warning
10 static const E g = e;
11 };
12
13 struct C {
14 typedef enum { e } E __attribute__ ((deprecated));
15 enum F { f = e }; // missing warning
16 static const E g = e;
17 };
cc1plus: warnings being treated as errors
u.cpp:10: error: 'E' is deprecated (declared at u.cpp:8)
u.cpp:16: error: 'C::E' is deprecated (declared at u.cpp:14)
1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219