This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, This patch fixes PR c++/44086. I've suppressed the check DECL_INITIAL(x) == NULL_TREE which prevents the CLASSTYPE_READONLY_FIELDS_NEED_INIT flag to be set. Maybe I miss something, but I can't find any reasons for checking this here. Symmetrically, I've done the same for reference, ie for the flag CLASSTYPE_REF_FIELDS_NEED_INIT. Tested x86_64-unknown-linux-gnu. OK for trunk ? gcc/testsuite/ChangeLog: 2010-05-17 Fabien Chêne <fabien.chene@gmail.com> PR c++/44086 * g++.dg/init/pr44086.C: New. * g++.dg/cpp0x/decltype4.C: Adjust. gcc/cp/ChangeLog: 2010-05-17 Fabien Chêne <fabien.chene@gmail.com> PR c++/44086 * class.c (check_field_decls): Remove the check 'DECL_INITIAL (x) == NULL_TREE' before setting CLASSTYPE_READONLY_FIELDS_NEED_INIT, which was preventing uninitialized const bitfields members to be diagnosed. Same for SET_CLASSTYPE_REF_FIELDS_NEED_INIT. * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the prototype. -- Fabien
Attachment:
pr44086.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |