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] |
2010/4/13 Jason Merrill <jason@redhat.com>: > On 04/13/2010 07:45 AM, Fabien CHÊNE wrote: >>> >>> The wording should be "user-provided" because it is an adjective. > > Yes. > >> FYI, instead of user-provided default constructor, Commeau, gives the >> following error message: no explicitly declared default constructor. >> Is it better ? Any better idea ? > > "user-provided" is more correct. ?But in the case of cpp0x/defaulted2.C, the > warning should explain that constructor is not user-provided because it is > explicitly defaulted in the class body. Here's an updated patch which implements what you suggest. Tested x86_64-unknown-linux-gnu. OK ? gcc/cp/ChangeLog: 2010-04-18 Fabien Chêne <fabien.chene@gmail.com> PR c++/42844 * decl.c (check_for_missing_ctor): New. (diagnose_missing_ctor): New. (check_initializer): Check for uninitialized const variable, where the constructor is missing. * class.c (in_class_defaulted_default_constructor): New. * cp-tree.h (in_class_defaulted_default_constructor): Declare it. gcc/testsuite/ChangeLog: 2010-04-18 Fabien Chêne <fabien.chene@gmail.com> * g++.dg/init/pr42844.C: New. * g++.dg/cpp0x/pr42844-2.C: New. * g++.dg/cpp0x/defaulted2.C: Adjust. * g++.dg/tree-ssa/pr27549.C: Likewise. * g++.old-deja/g++.mike/dyncast8.C: Likewise. libstdc++-v3/testsuite/ChangeLog: 2010-04-18 Fabien Chêne <fabien.chene@gmail.com> * testsuite/util/testsuite_error.h: Add empty default constructor to __gnu_test::test_category and __gnu_test::test_derived_category. * src/future.cc: Add empty default constructor to future_error_category. -- Fab
Attachment:
pr42844.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |