c++: -Wmissing-field-initializers in unevaluated ctx [PR98620]
authorMarek Polacek <polacek@redhat.com>
Mon, 11 Jan 2021 16:44:36 +0000 (11:44 -0500)
committerMarek Polacek <polacek@redhat.com>
Tue, 12 Jan 2021 03:31:39 +0000 (22:31 -0500)
commit814299a9d49c25ae2e8d00ec619559b71833871a
tree0594e03748425e7d1acd2b9af0fc040ab26adb14
parent240f0a490dae0fb9ef72fa21a93e8088d17fb682
c++: -Wmissing-field-initializers in unevaluated ctx [PR98620]

This PR wants us not to warn about missing field initializers when
the code in question takes places in decltype and similar.  Fixed
thus.

gcc/cp/ChangeLog:

PR c++/98620
* typeck2.c (process_init_constructor_record): Don't emit
-Wmissing-field-initializers warnings in unevaluated contexts.

gcc/testsuite/ChangeLog:

PR c++/98620
* g++.dg/warn/Wmissing-field-initializers-2.C: New test.
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/warn/Wmissing-field-initializers-2.C [new file with mode: 0644]