[Bug c++/70156] incorrect "incomplete type" error initializing a static const data member

2019-05-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70156

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Marek Polacek  ---
Fixed.

[Bug c++/70156] incorrect "incomplete type" error initializing a static const data member

2019-05-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70156

--- Comment #3 from Marek Polacek  ---
Author: mpolacek
Date: Tue May 14 21:10:58 2019
New Revision: 271192

URL: https://gcc.gnu.org/viewcvs?rev=271192&root=gcc&view=rev
Log:
PR c++/70156
* g++.dg/init/static5.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/init/static5.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/70156] incorrect "incomplete type" error initializing a static const data member

2019-05-14 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70156

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #2 from Marek Polacek  ---
Since r254461:

70156.C:4:23: error: ‘constexpr’ needed for in-class initialization of static
data member ‘const A<0> C::a’ of non-integral type [-fpermissive]
4 | static const A<0> a = { 0 };
  |   ^
70156.C:5:20: error: ‘constexpr’ needed for in-class initialization of static
data member ‘const B C::b’ of non-integral type [-fpermissive]
5 | static const B b = { 1 };
  |^

which is also what clang++ says.  I'll add the test.

[Bug c++/70156] incorrect "incomplete type" error initializing a static const data member

2016-07-10 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70156

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-11
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed, most likely GCC is not instainating the template here so GCC decides
it is incomplete.