I compiled some code with GCC with -Wall
and -Wextra
enabled. This code produces a warning:
struct A { A(int) {} };
struct B {};
struct C : A, B {};
int main() {
(void) C{1};
}
main.cpp: In function 'int main()': main.cpp:11:15: warning: missing initializer for member 'C::<anonymous>' [-Wmissing-field-initializers] (void) C{1}; ^
Should I be worried about that? Is this a bug in GCC for outputting this warning? It seems I have no field to initialize, and no missing parameters.