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

            Bug ID: 85353
           Summary: deprecation warning issued on data member with
                    initializer
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          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: https://wandbox.org/permlink/sqR7DvAlMfllCES0

Reply via email to