This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.
- From: Jason Merrill <jason at redhat dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jwakely at redhat dot com, dodji at redhat dot com
- Date: Fri, 03 Oct 2014 10:54:13 -0400
- Subject: Re: [PATCH 2/2] PR debug/63240 Add DWARF representation for C++11 defaulted member function.
- Authentication-results: sourceware.org; auth=none
- References: <1412341922-7891-1-git-send-email-mjw at redhat dot com> <1412341922-7891-2-git-send-email-mjw at redhat dot com> <542EB00A dot 8040605 at redhat dot com> <1412346943 dot 5933 dot 36 dot camel at bordewijk dot wildebeest dot org>
On 10/03/2014 10:35 AM, Mark Wielaard wrote:
Say you have a user defined copy constructor. The DWARF consumer will
see the declaration and can assume the class won't have a default
constructor (unless that one is explicitly declared too). But currently
the DWARF consumer cannot know whether that move constructor was really
a user defined. If it was declared with = default; then it will see the
move constructor and erroneously conclude that it was user defined and
so the class won't have a default constructor generated for it.
That's not erroneous, a declaration with =default still suppresses the
default constructor. "If there is no user-declared constructor for
class X, a constructor having no parameters is implicitly declared as
"user-declared" includes declarations that are defaulted in the class
body. "user-provided" is the category that does not include such