Bug ID: 85353
           Summary: deprecation warning issued on data member with
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot
          Reporter: haining.cpp at gmail dot com
  Target Milestone: ---

The following code issues deprecation warnings. "warning: 'Cls::x' is
deprecated "
struct Cls {
  [[deprecated]] int x = 0; // removing = 0 silences warning

int main() {
  Cls c;

The warning is only issued when the `= 0` is present. This code shouldn't be
warning at all. Live at wandbox:

Reply via email to