https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85353

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-04-11
                 CC|                            |msebor at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed with the extended test case below and __attribute__ ((deprecated)). 
It doesn't appear to be a regression.

$ cat pr85353.C && gcc -S -Wall pr85353.C
struct A {
  __attribute__ ((deprecated)) int x = 0;
} a;

struct B {
  __attribute__ ((deprecated)) int y;
} b;

struct C {
  __attribute__ ((deprecated)) int x = 0;
  __attribute__ ((deprecated)) int y;
} c;
pr85353.C: In constructor ‘constexpr A::A()’:
pr85353.C:1:8: warning: ‘A::x’ is deprecated [-Wdeprecated-declarations]
 struct A {
        ^
pr85353.C:2:40: note: declared here
   __attribute__ ((deprecated)) int x = 0;
                                        ^
pr85353.C:1:8: warning: ‘A::x’ is deprecated [-Wdeprecated-declarations]
 struct A {
        ^
pr85353.C:2:40: note: declared here
   __attribute__ ((deprecated)) int x = 0;
                                        ^
pr85353.C: At global scope:
pr85353.C:3:3: note: synthesized method ‘constexpr A::A()’ first required here
 } a;
   ^
pr85353.C: In constructor ‘C::C()’:
pr85353.C:9:8: warning: ‘C::x’ is deprecated [-Wdeprecated-declarations]
 struct C {
        ^
pr85353.C:10:40: note: declared here
   __attribute__ ((deprecated)) int x = 0;
                                        ^
pr85353.C:9:8: warning: ‘C::x’ is deprecated [-Wdeprecated-declarations]
 struct C {
        ^
pr85353.C:10:40: note: declared here
   __attribute__ ((deprecated)) int x = 0;
                                        ^
pr85353.C:9:8: warning: ‘C::y’ is deprecated [-Wdeprecated-declarations]
 struct C {
        ^
pr85353.C:11:36: note: declared here
   __attribute__ ((deprecated)) int y;
                                    ^
pr85353.C:9:8: warning: ‘C::y’ is deprecated [-Wdeprecated-declarations]
 struct C {
        ^
pr85353.C:11:36: note: declared here
   __attribute__ ((deprecated)) int y;
                                    ^
pr85353.C: At global scope:
pr85353.C:12:3: note: synthesized method ‘C::C()’ first required here
 } c;
   ^

Reply via email to