Bug 53629 - [c++11] spurious uninitialized warning in case of "non-static data member initializers".
Summary: [c++11] spurious uninitialized warning in case of "non-static data member ini...
Status: RESOLVED DUPLICATE of bug 53594
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.8.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 07:44 UTC by vincenzo Innocente
Modified: 2012-06-11 07:57 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vincenzo Innocente 2012-06-11 07:44:19 UTC
in case of non-static data member initializers. such as

struct MyConfig_Foo {
  const int i=3;
  const float f=4.14f;
};

one gets

c++ -O2 -std=gnu++11 Config11.cpp  -Wall
Config11.cpp:21:15: warning: non-static const member ‘const int MyConfig_Foo::i’ in class without a constructor [-Wuninitialized]
   const int i=3;
               ^
Config11.cpp:22:17: warning: non-static const member ‘const float MyConfig_Foo::f’ in class without a constructor [-Wuninitialized]
   const float f=4.14f;
                 ^

which I find incorrect.
Comment 1 Andrew Pinski 2012-06-11 07:57:31 UTC
Dup of bug 53594.

*** This bug has been marked as a duplicate of bug 53594 ***