[ping][PATCH] cp: warn uninitialized const/ref in base class [PR80681]

2023-01-04 Thread Charlie Sale via Gcc-patches
On this example: ``` struct Fine { private: const int f; }; struct BuggyA { const int a; int &b; }; struct BuggyB : private BuggyA { }; ``` g++ currently emits: ``` test.cc:3:19: warning: non-static const member ‘const int Fine::f’ in class without a constructor [-Wuninit

[PATCH] cp: warn uninitialized const/ref in base class [PR80681]

2022-12-24 Thread Charlie Sale via Gcc-patches
On this example: ``` struct Fine { private: const int f; }; struct BuggyA { const int a; int &b; }; struct BuggyB : private BuggyA { }; ``` g++ currently emits: ``` test.cc:3:19: warning: non-static const member ‘const int Fine::f’ in class without a constructor [-Wuninit