[Dwarf-Discuss] C++14 deduced return type
Jason Merrill
jason@redhat.com
Sat Nov 23 15:02:23 GMT 2013
C++14 will allow declaration of functions with a return type that will
be deduced from return statements in the definition:
struct A {
auto f(); // return type unknown
};
auto A::f() { return 42; } // return type is int
When we emit the debug information for A, we may not yet know what the
return type of f is, and we need to handle that somehow in DWARF. My
inclination is just to leave off the DW_AT_type on the member
declaration, and then provide one on the specification; consumers ought
to handle that fine, though in the absence of a specification they will
treat the declaration as having a return type of void.
Jason
More information about the Dwarf-discuss
mailing list