This is the mail archive of the 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]

Re: [Patch] Fix c++/PR42844

2010/4/13 Jason Merrill <>:
> 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 ?


2010-04-18  Fabien Chêne  <>
	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.


2010-04-18  Fabien Chêne  <>
	* 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.


2010-04-18  Fabien Chêne  <>
	* testsuite/util/testsuite_error.h: Add empty default constructor
	to __gnu_test::test_category and
	* src/ Add empty default constructor to


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]